aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-10-23 15:26:49 -0700
committerBrian Behlendorf <[email protected]>2014-10-23 15:30:32 -0700
commitadc90e9d946b53cb3eba963a2e2b1331cba0e7b5 (patch)
treed57871f0eac72c236a5c77e2a17dac49583ef336 /cmd
parent0ec072487b678bb2bda110304e8efccbc7df8713 (diff)
Fix zdb segfault
On 32-bit systems setting 'zfs_arc_max = 256M' in zdb results in the following segmentation fault. Rather than reverting 0ec0724 which introduced this flaw this code is only used for 64-bit builds. Segmentation fault (core dumped) ztest: '/sbin/zdb -bcc -d -U /var/tmp/zpool.cache ztest' exit code 139 child exited with code 3 Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zdb/zdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 205f65577..b0d7170b9 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -3522,11 +3522,13 @@ main(int argc, char **argv)
usage();
}
+#if defined(_LP64)
/*
* ZDB does not typically re-read blocks; therefore limit the ARC
* to 256 MB, which can be used entirely for metadata.
*/
zfs_arc_max = zfs_arc_meta_limit = 256 * 1024 * 1024;
+#endif
kernel_init(FREAD);
if ((g_zfs = libzfs_init()) == NULL)