Skip to content

Commit 3fc7a72

Browse files
amotinandrewc12
authored andcommitted
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 600a02b 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 <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored-By: iXsystems, Inc. Closes openzfs#13486 Closes openzfs#13513
1 parent 9f99903 commit 3fc7a72

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

module/zfs/spa_log_spacemap.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -511,12 +511,6 @@ spa_log_summary_decrement_blkcount(spa_t *spa, uint64_t blocks_gone)
511511
e->lse_txgcount--;
512512
for (; e != NULL; e = list_head(&spa->spa_log_summary)) {
513513
if (e->lse_blkcount > blocks_gone) {
514-
/*
515-
* Assert that we stopped at an entry that is not
516-
* obsolete.
517-
*/
518-
ASSERT(e->lse_mscount != 0);
519-
520514
e->lse_blkcount -= blocks_gone;
521515
blocks_gone = 0;
522516
break;

0 commit comments

Comments
 (0)