svn commit: r288566 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Sat Oct 3 07:53:57 UTC 2015
Author: mav
Date: Sat Oct 3 07:53:56 2015
New Revision: 288566
URL: https://svnweb.freebsd.org/changeset/base/288566
Log:
MFC r286655: Fix set of sign extension bugs in r286625.
Modified:
stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 3 07:53:08 2015 (r288565)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 3 07:53:56 2015 (r288566)
@@ -3148,7 +3148,7 @@ arc_available_memory(void)
* Cooperate with pagedaemon when it's time for it to scan
* and reclaim some pages.
*/
- n = PAGESIZE * (int64_t)(freemem - zfs_arc_free_target);
+ n = PAGESIZE * ((int64_t)freemem - zfs_arc_free_target);
if (n < lowest) {
lowest = n;
r = FMR_LOTSFREE;
@@ -3210,7 +3210,7 @@ arc_available_memory(void)
* heap is allocated. (Or, in the calculation, if less than 1/4th is
* free)
*/
- n = vmem_size(heap_arena, VMEM_FREE) -
+ n = (int64_t)vmem_size(heap_arena, VMEM_FREE) -
(vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC) >> 2);
if (n < lowest) {
lowest = n;
@@ -3231,7 +3231,7 @@ arc_available_memory(void)
* memory fragmentation issues.
*/
if (zio_arena != NULL) {
- n = vmem_size(zio_arena, VMEM_FREE) -
+ n = (int64_t)vmem_size(zio_arena, VMEM_FREE) -
(vmem_size(zio_arena, VMEM_ALLOC) >> 4);
if (n < lowest) {
lowest = n;
@@ -3245,7 +3245,8 @@ arc_available_memory(void)
*/
if (lowest > 0) {
n = (vmem_size(heap_arena, VMEM_MAXFREE) < zfs_max_recordsize) ?
- -(vmem_size(heap_arena, VMEM_ALLOC) >> 4) : INT64_MAX;
+ -((int64_t)vmem_size(heap_arena, VMEM_ALLOC) >> 4) :
+ INT64_MAX;
if (n < lowest) {
lowest = n;
r = FMR_ZIO_FRAG;
More information about the svn-src-stable-10
mailing list