summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-10-12 15:44:44 +0000
committermav <mav@FreeBSD.org>2015-10-12 15:44:44 +0000
commit297ae72354c3fa9d949617e600459b916ef47c5d (patch)
tree8c56acedb05fcead8e6e5c011593e25df2f3fc6c /sys/cddl
parent8a2ea2981df7a27aeaca045afc16f42a9658b173 (diff)
downloadFreeBSD-src-297ae72354c3fa9d949617e600459b916ef47c5d.zip
FreeBSD-src-297ae72354c3fa9d949617e600459b916ef47c5d.tar.gz
MFV r289187: 6251 add tunable to disable free_bpobj processing
Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Simon Klinkert <simon.klinkert@gmail.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed by: Albert Lee <trisk@omniti.com> Reviewed by: Xin Li <delphij@freebsd.org> Approved by: Garrett D'Amore <garrett@damore.org> Author: George Wilson <george.wilson@delphix.com> illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
index 406af3b..6b54a01 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
+++ b/sys/cddl/contrib/opensolaris/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 <sys/dsl_scan.h>
@@ -102,6 +102,11 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, free_max_blocks, CTLFLAG_RWTUN,
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,
@@ -1451,7 +1456,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);
OpenPOWER on IntegriCloud