dmu_tx_assign: make all VERIFY0 calls use DMU_TX_SUSPEND

This is the cheap way to keep non-user functions working after
break-on-suspend becomes default.

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:
Rob Norris
2024-07-09 13:59:57 +10:00
committed by Brian Behlendorf
parent 4653e2f7d3
commit 55d035e866
11 changed files with 23 additions and 19 deletions
+7 -5
View File
@@ -957,7 +957,7 @@ zil_commit_activate_saxattr_feature(zilog_t *zilog)
dmu_objset_type(zilog->zl_os) != DMU_OST_ZVOL &&
!dsl_dataset_feature_is_active(ds, SPA_FEATURE_ZILSAXATTR)) {
tx = dmu_tx_create(zilog->zl_os);
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND));
dsl_dataset_dirty(ds, tx);
txg = dmu_tx_get_txg(tx);
@@ -1003,7 +1003,7 @@ zil_create(zilog_t *zilog)
*/
if (BP_IS_HOLE(&blk) || BP_SHOULD_BYTESWAP(&blk)) {
tx = dmu_tx_create(zilog->zl_os);
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND));
dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx);
txg = dmu_tx_get_txg(tx);
@@ -1093,7 +1093,7 @@ zil_destroy(zilog_t *zilog, boolean_t keep_first)
return (B_FALSE);
tx = dmu_tx_create(zilog->zl_os);
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND));
dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx);
txg = dmu_tx_get_txg(tx);
@@ -1977,7 +1977,8 @@ next_lwb:
* Open transaction to allocate the next block pointer.
*/
dmu_tx_t *tx = dmu_tx_create(zilog->zl_os);
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_NOTHROTTLE));
VERIFY0(dmu_tx_assign(tx,
DMU_TX_WAIT | DMU_TX_NOTHROTTLE | DMU_TX_SUSPEND));
dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx);
uint64_t txg = dmu_tx_get_txg(tx);
@@ -3456,7 +3457,8 @@ zil_commit_itx_assign(zilog_t *zilog, zil_commit_waiter_t *zcw)
* should not be subject to the dirty data based delays. We
* use DMU_TX_NOTHROTTLE to bypass the delay mechanism.
*/
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_NOTHROTTLE));
VERIFY0(dmu_tx_assign(tx,
DMU_TX_WAIT | DMU_TX_NOTHROTTLE | DMU_TX_SUSPEND));
itx_t *itx = zil_itx_create(TX_COMMIT, sizeof (lr_t));
itx->itx_sync = B_TRUE;