summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorTom Caputi <tcaputi@datto.com>2017-10-11 12:12:48 -0400
committerTom Caputi <tcaputi@datto.com>2017-10-11 16:53:37 -0400
commit94d49e8f9bd2e58a783066327c84b7d3b605ac0f (patch)
tree4667cefa59118620f42095e8b35f5c50f6bb7e84 /module
parent29e07af5ae77e0ddf9ccfb77684f9713627b2ceb (diff)
Relax ASSERT for #6526
This patch resolves a minor issue where an ASSERT in metaslab_passivate() that only applies to non weight-based metaslabs was erroneously applied to all metaslabs. Signed-off-by: Tom Caputi <tcaputi@datto.com>
Diffstat (limited to 'module')
-rw-r--r--module/zfs/metaslab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 5e413c065..01e5234c7 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -1937,7 +1937,8 @@ metaslab_passivate(metaslab_t *msp, uint64_t weight)
* this metaslab again. In that case, it had better be empty,
* or we would be leaving space on the table.
*/
- ASSERT(size >= SPA_MINBLOCKSIZE ||
+ ASSERT(!WEIGHT_IS_SPACEBASED(msp->ms_weight) ||
+ size >= SPA_MINBLOCKSIZE ||
range_tree_space(msp->ms_tree) == 0);
ASSERT0(weight & METASLAB_ACTIVE_MASK);