diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index b08cd2b63..c1a09e3a9 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -245,12 +245,16 @@ cksummer(void *arg) int outfd; dedup_table_t ddt; zio_cksum_t stream_cksum; - uint64_t physmem = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE); uint64_t numbuckets; +#ifdef _ILP32 + ddt.max_ddt_size = SMALLEST_POSSIBLE_MAX_DDT_MB << 20; +#else + uint64_t physmem = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE); ddt.max_ddt_size = MAX((physmem * MAX_DDT_PHYSMEM_PERCENT) / 100, SMALLEST_POSSIBLE_MAX_DDT_MB << 20); +#endif numbuckets = ddt.max_ddt_size / (sizeof (dedup_entry_t)); |