From 139510fb6efa97dbe5f5479594b308d940cab8d1 Mon Sep 17 00:00:00 2001 From: George Wilson Date: Wed, 23 Sep 2015 15:03:01 -0700 Subject: [PATCH] 6251 add tunable to disable free_bpobj processing Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed by: Simon Klinkert Reviewed by: Richard Elling Reviewed by: Albert Lee Reviewed by: Xin Li Approved by: Garrett D'Amore --- usr/src/uts/common/fs/zfs/dsl_scan.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr/src/uts/common/fs/zfs/dsl_scan.c b/usr/src/uts/common/fs/zfs/dsl_scan.c index ba397b1bb0..6ba5cb6a1c 100644 --- a/usr/src/uts/common/fs/zfs/dsl_scan.c +++ b/usr/src/uts/common/fs/zfs/dsl_scan.c @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. */ #include @@ -78,6 +78,11 @@ uint64_t zfs_free_max_blocks = UINT64_MAX; extern int zfs_txg_timeout; +/* + * Enable/disable the processing of the free_bpobj object. + */ +boolean_t zfs_free_bpobj_enabled = B_TRUE; + /* the order has to match pool_scan_type */ static scan_cb_t *scan_funcs[POOL_SCAN_FUNCS] = { NULL, @@ -1426,7 +1431,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) * have to worry about traversing it. It is also faster to free the * blocks than to scrub them. */ - if (spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { + if (zfs_free_bpobj_enabled && + spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { scn->scn_is_bptree = B_FALSE; scn->scn_zio_root = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED); -- 2.11.4.GIT