From a8825d5cb781a7178ca459e168854623e2ace6de Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Wed, 1 Jun 2022 12:54:35 -0400 Subject: [PATCH] Remove wrong assertion in log spacemap 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 Signed-off-by: Alexander Motin Sponsored-By: iXsystems, Inc. Closes #13486 Closes #13513 --- module/zfs/spa_log_spacemap.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/module/zfs/spa_log_spacemap.c b/module/zfs/spa_log_spacemap.c index 6fd302b8df34..fbc5bef369b9 100644 --- a/module/zfs/spa_log_spacemap.c +++ b/module/zfs/spa_log_spacemap.c @@ -493,12 +493,6 @@ spa_log_summary_decrement_blkcount(spa_t *spa, uint64_t blocks_gone) for (log_summary_entry_t *e = list_head(&spa->spa_log_summary); 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;