]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Remove wrong assertion in log spacemap
authorAlexander Motin <mav@FreeBSD.org>
Wed, 1 Jun 2022 16:54:35 +0000 (12:54 -0400)
committerGitHub <noreply@github.com>
Wed, 1 Jun 2022 16:54:35 +0000 (09:54 -0700)
It is typical, but not generally true that if log summary has more
blocks it must also have unflushed metaslabs.  Normally with metaslabs
flushed in order it works, but there are known exceptions, such as
device removal or metaslab being loaded during its flush attempt.

Before 600a02b8844 if spa_flush_metaslabs() hit loading metaslab it
usually stopped (unless memlimit is also exceeded), but now it may
flush more metaslabs, just skipping that particular one.  This
increased chances of assertion to fire when the skipped metaslab is
flushed on next iteration if all other metaslabs in that summary
entry are already flushed out of order.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #13486
Closes #13513

module/zfs/spa_log_spacemap.c

index f831509a4247448466326e9a1ea52b75cbd32609..c5a1039bd838eaeda8e1c9ecb9b6a9a82657e65f 100644 (file)
@@ -511,12 +511,6 @@ spa_log_summary_decrement_blkcount(spa_t *spa, uint64_t blocks_gone)
                e->lse_txgcount--;
        for (; e != NULL; e = list_head(&spa->spa_log_summary)) {
                if (e->lse_blkcount > blocks_gone) {
-                       /*
-                        * Assert that we stopped at an entry that is not
-                        * obsolete.
-                        */
-                       ASSERT(e->lse_mscount != 0);
-
                        e->lse_blkcount -= blocks_gone;
                        blocks_gone = 0;
                        break;