diff options
4 files changed, 6 insertions, 6 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c index f3d7ee6..6d361d9 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -624,7 +624,7 @@ buf_init(void) * with an average 64K block size. The table will take up * totalmem*sizeof(void*)/64K (eg. 128KB/GB with 8-byte pointers). */ - while (hsize * 65536 < physmem * PAGESIZE) + while (hsize * 65536 < (uint64_t)physmem * PAGESIZE) hsize <<= 1; retry: buf_hash_table.ht_mask = hsize - 1; @@ -2801,7 +2801,7 @@ arc_init(void) #ifdef _KERNEL /* Warn about ZFS memory requirements. */ - if ((physmem * PAGESIZE) < (256 + 128 + 64) * (1 << 20)) { + if (((uint64_t)physmem * PAGESIZE) < (256 + 128 + 64) * (1 << 20)) { printf("ZFS WARNING: Recomended minimum of RAM size is 512MB, " "expect unstable behaviour.\n"); } else if (kmem_size() < 256 * (1 << 20)) { diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c index 1fde66f..bd6d50b 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c @@ -250,7 +250,7 @@ dbuf_init(void) * with an average 4K block size. The table will take up * totalmem*sizeof(void*)/4K (i.e. 2MB/GB with 8-byte pointers). */ - while (hsize * 4096 < physmem * PAGESIZE) + while (hsize * 4096 < (uint64_t)physmem * PAGESIZE) hsize <<= 1; retry: diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c index f3d7ee6..6d361d9 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -624,7 +624,7 @@ buf_init(void) * with an average 64K block size. The table will take up * totalmem*sizeof(void*)/64K (eg. 128KB/GB with 8-byte pointers). */ - while (hsize * 65536 < physmem * PAGESIZE) + while (hsize * 65536 < (uint64_t)physmem * PAGESIZE) hsize <<= 1; retry: buf_hash_table.ht_mask = hsize - 1; @@ -2801,7 +2801,7 @@ arc_init(void) #ifdef _KERNEL /* Warn about ZFS memory requirements. */ - if ((physmem * PAGESIZE) < (256 + 128 + 64) * (1 << 20)) { + if (((uint64_t)physmem * PAGESIZE) < (256 + 128 + 64) * (1 << 20)) { printf("ZFS WARNING: Recomended minimum of RAM size is 512MB, " "expect unstable behaviour.\n"); } else if (kmem_size() < 256 * (1 << 20)) { diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/dbuf.c b/sys/contrib/opensolaris/uts/common/fs/zfs/dbuf.c index 1fde66f..bd6d50b 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/dbuf.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/dbuf.c @@ -250,7 +250,7 @@ dbuf_init(void) * with an average 4K block size. The table will take up * totalmem*sizeof(void*)/4K (i.e. 2MB/GB with 8-byte pointers). */ - while (hsize * 4096 < physmem * PAGESIZE) + while (hsize * 4096 < (uint64_t)physmem * PAGESIZE) hsize <<= 1; retry: |