summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2014-01-15 22:53:12 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2014-01-15 22:53:12 +0000
commitd1d51e78b243321127b2eb6a052c6ddea380abfb (patch)
treeb541cfe58f7c098a117f23666c59e51fd0eff8e8
parent7178bc7969808c1ce80e356dd02782803cfa1e65 (diff)
downloadillumos-joyent-d1d51e78b243321127b2eb6a052c6ddea380abfb.tar.gz
OS-2711 want absolute way to avoid condensing metaslabs
-rw-r--r--usr/src/uts/common/fs/zfs/metaslab.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/metaslab.c b/usr/src/uts/common/fs/zfs/metaslab.c
index 7f8264e5b4..b078e3920e 100644
--- a/usr/src/uts/common/fs/zfs/metaslab.c
+++ b/usr/src/uts/common/fs/zfs/metaslab.c
@@ -62,6 +62,11 @@ uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */
int zfs_condense_pct = 200;
/*
+ * Never condense any space map. This is for debugging/recovery only.
+ */
+int zfs_condense_never = 0;
+
+/*
* This value defines the number of allowed allocation failures per vdev.
* If a device reaches this threshold in a given txg then we consider skipping
* allocations on that device. The value of zfs_mg_alloc_failures is computed
@@ -1288,6 +1293,9 @@ metaslab_should_condense(metaslab_t *msp)
ASSERT(MUTEX_HELD(&msp->ms_lock));
ASSERT(msp->ms_loaded);
+ if (zfs_condense_never != 0)
+ return (B_FALSE);
+
/*
* Use the ms_size_tree range tree, which is ordered by size, to
* obtain the largest segment in the free tree. If the tree is empty