]> granicus.if.org Git - zfs/commitdiff
Relax ASSERT for #6526
authorTom Caputi <tcaputi@datto.com>
Wed, 11 Oct 2017 16:12:48 +0000 (12:12 -0400)
committerTom Caputi <tcaputi@datto.com>
Wed, 11 Oct 2017 20:53:37 +0000 (16:53 -0400)
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>
module/zfs/metaslab.c

index 5e413c06518b0dda6b9899822432d655850cd41e..01e5234c7cf526be7c685a45e875da6d00db3518 100644 (file)
@@ -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);