zil_close: don't try to deallocate on-disk blocks

If we're force-exporting or failed then there's no guarantee the IO will
get anywhere. If its a clean shutdown then that's actually the lead
block and it'll be sorted out during replay or next txg.

(cherry picked from commit 01e04a4eef7811a31a6258c99d0cc51217732758)
This commit is contained in:
Rob Norris 2023-05-12 16:47:09 +10:00 committed by Geoff Amey
parent 11d3cff47b
commit 5a256eaed1
1 changed files with 0 additions and 1 deletions

View File

@ -4064,7 +4064,6 @@ zil_close(zilog_t *zilog)
if (lwb->lwb_buf != NULL) if (lwb->lwb_buf != NULL)
zio_buf_free(lwb->lwb_buf, lwb->lwb_sz); zio_buf_free(lwb->lwb_buf, lwb->lwb_sz);
zio_free(zilog->zl_spa, txg, &lwb->lwb_blk);
zil_free_lwb(zilog, lwb); zil_free_lwb(zilog, lwb);
} while ((lwb = list_head(&zilog->zl_lwb_list)) != NULL); } while ((lwb = list_head(&zilog->zl_lwb_list)) != NULL);