HomeFreeBSD

txg_wait_synced_flags: add TXG_WAIT_SUSPEND flag to not wait if pool suspended

Description

txg_wait_synced_flags: add TXG_WAIT_SUSPEND flag to not wait if pool suspended

This allows a caller to request a wait for txg sync, with an appropriate
error return if the pool is suspended or becomes suspended during the
wait.

To support this, txg_wait_kick() is added to signal the sync condvar,
which wakes up the waiters, causing them to loop and reconsider their
wait conditions again. zio_suspend() now calls this to trigger the break
if the pool suspends while waiting.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17355

Details

Provenance
rob.norris_klarasystems.comAuthored on Feb 24 2025, 2:56 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 28 2025, 5:27 PM
Parents
rG8487945034bf: zcp: get_prop: fix encryptionroot and encryption
Branches
Unknown
Tags
Unknown