HomeFreeBSD

Again fix race between zil_commit() and zil_suspend().

Description

Again fix race between zil_commit() and zil_suspend().

With zl_suspend read in zil_commit() not protected by any locks it
is possible for new ZIL writes to be in progress while zil_destroy()
called by zil_suspend() freeing them. This patch closes the race
by taking zl_issuer_lock in zil_suspend() and adding the second
zl_suspend check to zil_get_commit_list(), protected by the lock.
It allows all already queued transactions to be logged normally,
while blocks any new ones, calling txg_wait_synced() for the TXGs.

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

Details

Provenance
mavAuthored on Jun 30 2023, 3:59 PM
GitHub <noreply@github.com>Committed on Jun 30 2023, 3:59 PM
Parents
rGb4a087309235: Some ZIO micro-optimizations.
Branches
Unknown
Tags
Unknown