]> granicus.if.org Git - zfs/commitdiff
mismerged log spacemap comment for metaslab_verify_weight_and_frag
authorSerapheim Dimitropoulos <serapheim@delphix.com>
Tue, 30 Jul 2019 17:13:44 +0000 (10:13 -0700)
committerMatthew Ahrens <mahrens@delphix.com>
Tue, 30 Jul 2019 17:13:44 +0000 (10:13 -0700)
When the log spacemap commit was merged in ZoL, the
metaslab_verify_unflushed_changes() debugging function
was deleted as the feature was pretty much stable by
then. Unfortunately though there was a reference to
it from a comment in metaslab_verify_weight_and_frag().

This patch deletes the reference and pastes that
comment as is.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #9097

module/zfs/metaslab.c

index 20884d02c4fa225952ec673c5a054515d1772900..02b91378072a26eabb6f70d631f6d31adbd23341 100644 (file)
@@ -1639,7 +1639,15 @@ metaslab_verify_weight_and_frag(metaslab_t *msp)
        if ((zfs_flags & ZFS_DEBUG_METASLAB_VERIFY) == 0)
                return;
 
-       /* see comment in metaslab_verify_unflushed_changes() */
+       /*
+        * We can end up here from vdev_remove_complete(), in which case we
+        * cannot do these assertions because we hold spa config locks and
+        * thus we are not allowed to read from the DMU.
+        *
+        * We check if the metaslab group has been removed and if that's
+        * the case we return immediately as that would mean that we are
+        * here from the aforementioned code path.
+        */
        if (msp->ms_group == NULL)
                return;