mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
dmu_tx: break tx assign/wait when pool suspends
This adjusts dmu_tx_assign/dmu_tx_wait to be interruptable if the pool suspends while they're waiting, rather than just on the initial check before falling back into a wait. Since that's not always wanted, add a DMU_TX_SUSPEND flag to ignore suspend entirely, effectively returning to the previous behaviour. With that, it shouldn't be possible for anything with a standard dmu_tx_assign/wait/abort loop to block under failmode=continue. Also should be a bit tighter than the old behaviour, where a VERIFY0(dmu_tx_assign(DMU_TX_WAIT)) could technically fail if the pool is already suspended and failmode=continue. 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
This commit is contained in:
committed by
Brian Behlendorf
parent
ac2e579521
commit
4653e2f7d3
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2012, 2016 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2025, Klara, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_DMU_TX_H
|
||||
@@ -80,6 +81,9 @@ struct dmu_tx {
|
||||
/* has this transaction already been delayed? */
|
||||
boolean_t tx_dirty_delayed;
|
||||
|
||||
/* whether dmu_tx_wait() should return on suspend */
|
||||
boolean_t tx_break_on_suspend;
|
||||
|
||||
int tx_err;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user