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 600a02b884 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
This commit is contained in:
Alexander Motin 2022-06-01 12:54:35 -04:00 committed by GitHub
parent bc8192cd5b
commit 42cf2ad0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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;