mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
dmu_tx: rename dmu_tx_assign() flags from TXG_* to DMU_TX_* (#17143)
This helps to avoids confusion with the similarly-named txg_wait_synced(). Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Mariusz Zaborski <mariusz.zaborski@klarasystems.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
+3
-3
@@ -1051,7 +1051,7 @@ dmu_free_long_range_impl(objset_t *os, dnode_t *dn, uint64_t offset,
|
||||
* reduction in space used.
|
||||
*/
|
||||
dmu_tx_mark_netfree(tx);
|
||||
err = dmu_tx_assign(tx, TXG_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (err) {
|
||||
dmu_tx_abort(tx);
|
||||
return (err);
|
||||
@@ -1142,7 +1142,7 @@ dmu_free_long_object(objset_t *os, uint64_t object)
|
||||
dmu_tx_hold_bonus(tx, object);
|
||||
dmu_tx_hold_free(tx, object, 0, DMU_OBJECT_END);
|
||||
dmu_tx_mark_netfree(tx);
|
||||
err = dmu_tx_assign(tx, TXG_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (err == 0) {
|
||||
err = dmu_object_free(os, object, tx);
|
||||
dmu_tx_commit(tx);
|
||||
@@ -1996,7 +1996,7 @@ dmu_sync_late_arrival(zio_t *pio, objset_t *os, dmu_sync_cb_t *done, zgd_t *zgd,
|
||||
* which time the log block we are writing will be obsolete, so we can
|
||||
* skip waiting and just return error here instead.
|
||||
*/
|
||||
if (dmu_tx_assign(tx, TXG_NOWAIT | TXG_NOTHROTTLE) != 0) {
|
||||
if (dmu_tx_assign(tx, DMU_TX_NOWAIT | DMU_TX_NOTHROTTLE) != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
/* Make zl_get_data do txg_waited_synced() */
|
||||
return (SET_ERROR(EIO));
|
||||
|
||||
@@ -2452,7 +2452,7 @@ dmu_objset_space_upgrade(objset_t *os)
|
||||
continue;
|
||||
tx = dmu_tx_create(os);
|
||||
dmu_tx_hold_bonus(tx, obj);
|
||||
objerr = dmu_tx_assign(tx, TXG_WAIT);
|
||||
objerr = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (objerr != 0) {
|
||||
dmu_buf_rele(db, FTAG);
|
||||
dmu_tx_abort(tx);
|
||||
|
||||
@@ -2024,7 +2024,7 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
|
||||
tx = dmu_tx_create(rwa->os);
|
||||
dmu_tx_hold_bonus(tx, object_to_hold);
|
||||
dmu_tx_hold_write(tx, object_to_hold, 0, 0);
|
||||
err = dmu_tx_assign(tx, TXG_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (err != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
return (err);
|
||||
@@ -2228,7 +2228,7 @@ flush_write_batch_impl(struct receive_writer_arg *rwa)
|
||||
dmu_tx_hold_write_by_dnode(tx, dn, first_drrw->drr_offset,
|
||||
last_drrw->drr_offset - first_drrw->drr_offset +
|
||||
last_drrw->drr_logical_size);
|
||||
err = dmu_tx_assign(tx, TXG_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (err != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
dnode_rele(dn, FTAG);
|
||||
@@ -2501,7 +2501,7 @@ receive_write_embedded(struct receive_writer_arg *rwa,
|
||||
|
||||
dmu_tx_hold_write(tx, drrwe->drr_object,
|
||||
drrwe->drr_offset, drrwe->drr_length);
|
||||
err = dmu_tx_assign(tx, TXG_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (err != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
return (err);
|
||||
@@ -2564,7 +2564,7 @@ receive_spill(struct receive_writer_arg *rwa, struct drr_spill *drrs,
|
||||
|
||||
dmu_tx_hold_spill(tx, db->db_object);
|
||||
|
||||
err = dmu_tx_assign(tx, TXG_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (err != 0) {
|
||||
dmu_buf_rele(db, FTAG);
|
||||
dmu_buf_rele(db_spill, FTAG);
|
||||
|
||||
@@ -568,7 +568,7 @@ commit_rl_updates(objset_t *os, struct merge_data *md, uint64_t object,
|
||||
{
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(os->os_spa)->dp_mos_dir);
|
||||
dmu_tx_hold_space(tx, sizeof (struct redact_block_list_node));
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
uint64_t txg = dmu_tx_get_txg(tx);
|
||||
if (!md->md_synctask_txg[txg & TXG_MASK]) {
|
||||
dsl_sync_task_nowait(dmu_tx_pool(tx),
|
||||
|
||||
+15
-15
@@ -1017,7 +1017,7 @@ dmu_tx_delay(dmu_tx_t *tx, uint64_t dirty)
|
||||
* decreasing performance.
|
||||
*/
|
||||
static int
|
||||
dmu_tx_try_assign(dmu_tx_t *tx, uint64_t txg_how)
|
||||
dmu_tx_try_assign(dmu_tx_t *tx, uint64_t flags)
|
||||
{
|
||||
spa_t *spa = tx->tx_pool->dp_spa;
|
||||
|
||||
@@ -1037,11 +1037,11 @@ dmu_tx_try_assign(dmu_tx_t *tx, uint64_t txg_how)
|
||||
* Otherwise, return EIO so that an error can get
|
||||
* propagated back to the VOP calls.
|
||||
*
|
||||
* Note that we always honor the txg_how flag regardless
|
||||
* Note that we always honor the `flags` flag regardless
|
||||
* of the failuremode setting.
|
||||
*/
|
||||
if (spa_get_failmode(spa) == ZIO_FAILURE_MODE_CONTINUE &&
|
||||
!(txg_how & TXG_WAIT))
|
||||
!(flags & DMU_TX_WAIT))
|
||||
return (SET_ERROR(EIO));
|
||||
|
||||
return (SET_ERROR(ERESTART));
|
||||
@@ -1165,20 +1165,20 @@ dmu_tx_unassign(dmu_tx_t *tx)
|
||||
}
|
||||
|
||||
/*
|
||||
* Assign tx to a transaction group; txg_how is a bitmask:
|
||||
* Assign tx to a transaction group; `flags` is a bitmask:
|
||||
*
|
||||
* If TXG_WAIT is set and the currently open txg is full, this function
|
||||
* If DMU_TX_WAIT is set and the currently open txg is full, this function
|
||||
* will wait until there's a new txg. This should be used when no locks
|
||||
* are being held. With this bit set, this function will only fail if
|
||||
* we're truly out of space (or over quota).
|
||||
*
|
||||
* If TXG_WAIT is *not* set and we can't assign into the currently open
|
||||
* If DMU_TX_WAIT is *not* set and we can't assign into the currently open
|
||||
* txg without blocking, this function will return immediately with
|
||||
* ERESTART. This should be used whenever locks are being held. On an
|
||||
* ERESTART error, the caller should drop all locks, call dmu_tx_wait(),
|
||||
* and try again.
|
||||
*
|
||||
* If TXG_NOTHROTTLE is set, this indicates that this tx should not be
|
||||
* If DMU_TX_NOTHROTTLE is set, this indicates that this tx should not be
|
||||
* delayed due on the ZFS Write Throttle (see comments in dsl_pool.c for
|
||||
* details on the throttle). This is used by the VFS operations, after
|
||||
* they have already called dmu_tx_wait() (though most likely on a
|
||||
@@ -1201,24 +1201,24 @@ dmu_tx_unassign(dmu_tx_t *tx)
|
||||
* 1 <- dmu_tx_get_txg(T3)
|
||||
*/
|
||||
int
|
||||
dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how)
|
||||
dmu_tx_assign(dmu_tx_t *tx, uint64_t flags)
|
||||
{
|
||||
int err;
|
||||
|
||||
ASSERT(tx->tx_txg == 0);
|
||||
ASSERT0(txg_how & ~(TXG_WAIT | TXG_NOTHROTTLE));
|
||||
ASSERT0(flags & ~(DMU_TX_WAIT | DMU_TX_NOTHROTTLE));
|
||||
ASSERT(!dsl_pool_sync_context(tx->tx_pool));
|
||||
|
||||
/* If we might wait, we must not hold the config lock. */
|
||||
IMPLY((txg_how & TXG_WAIT), !dsl_pool_config_held(tx->tx_pool));
|
||||
IMPLY((flags & DMU_TX_WAIT), !dsl_pool_config_held(tx->tx_pool));
|
||||
|
||||
if ((txg_how & TXG_NOTHROTTLE))
|
||||
if ((flags & DMU_TX_NOTHROTTLE))
|
||||
tx->tx_dirty_delayed = B_TRUE;
|
||||
|
||||
while ((err = dmu_tx_try_assign(tx, txg_how)) != 0) {
|
||||
while ((err = dmu_tx_try_assign(tx, flags)) != 0) {
|
||||
dmu_tx_unassign(tx);
|
||||
|
||||
if (err != ERESTART || !(txg_how & TXG_WAIT))
|
||||
if (err != ERESTART || !(flags & DMU_TX_WAIT))
|
||||
return (err);
|
||||
|
||||
dmu_tx_wait(tx);
|
||||
@@ -1263,9 +1263,9 @@ dmu_tx_wait(dmu_tx_t *tx)
|
||||
|
||||
/*
|
||||
* Note: setting tx_dirty_delayed only has effect if the
|
||||
* caller used TX_WAIT. Otherwise they are going to
|
||||
* caller used DMU_TX_WAIT. Otherwise they are going to
|
||||
* destroy this tx and try again. The common case,
|
||||
* zfs_write(), uses TX_WAIT.
|
||||
* zfs_write(), uses DMU_TX_WAIT.
|
||||
*/
|
||||
tx->tx_dirty_delayed = B_TRUE;
|
||||
} else if (spa_suspended(spa) || tx->tx_lasttried_txg == 0) {
|
||||
|
||||
@@ -1434,7 +1434,7 @@ dsl_scan_restart_resilver(dsl_pool_t *dp, uint64_t txg)
|
||||
if (txg == 0) {
|
||||
dmu_tx_t *tx;
|
||||
tx = dmu_tx_create_dd(dp->dp_mos_dir);
|
||||
VERIFY(0 == dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY(0 == dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
|
||||
txg = dmu_tx_get_txg(tx);
|
||||
dp->dp_scan->scn_restart_txg = txg;
|
||||
|
||||
@@ -58,7 +58,7 @@ dsl_sync_task_common(const char *pool, dsl_checkfunc_t *checkfunc,
|
||||
|
||||
top:
|
||||
tx = dmu_tx_create_dd(dp->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
|
||||
dst.dst_pool = dp;
|
||||
dst.dst_txg = dmu_tx_get_txg(tx);
|
||||
|
||||
+3
-3
@@ -1984,7 +1984,7 @@ static void
|
||||
spa_unload_log_sm_flush_all(spa_t *spa)
|
||||
{
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
|
||||
ASSERT3U(spa->spa_log_flushall_txg, ==, 0);
|
||||
spa->spa_log_flushall_txg = dmu_tx_get_txg(tx);
|
||||
@@ -3262,7 +3262,7 @@ spa_livelist_condense_cb(void *arg, zthr_t *t)
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
dmu_tx_mark_netfree(tx);
|
||||
dmu_tx_hold_space(tx, 1);
|
||||
err = dmu_tx_assign(tx, TXG_NOWAIT | TXG_NOTHROTTLE);
|
||||
err = dmu_tx_assign(tx, DMU_TX_NOWAIT | DMU_TX_NOTHROTTLE);
|
||||
if (err == 0) {
|
||||
/*
|
||||
* Prevent the condense zthr restarting before
|
||||
@@ -8593,7 +8593,7 @@ spa_vdev_split_mirror(spa_t *spa, const char *newname, nvlist_t *config,
|
||||
/* finally, update the original pool's config */
|
||||
txg = spa_vdev_config_enter(spa);
|
||||
tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error != 0)
|
||||
dmu_tx_abort(tx);
|
||||
for (c = 0; c < children; c++) {
|
||||
|
||||
@@ -385,7 +385,7 @@ spa_history_log_nvl(spa_t *spa, nvlist_t *nvl)
|
||||
}
|
||||
|
||||
tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
err = dmu_tx_assign(tx, TXG_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (err) {
|
||||
dmu_tx_abort(tx);
|
||||
return (err);
|
||||
@@ -561,7 +561,7 @@ spa_history_log_internal(spa_t *spa, const char *operation,
|
||||
/* create a tx if we didn't get one */
|
||||
if (tx == NULL) {
|
||||
htx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
if (dmu_tx_assign(htx, TXG_WAIT) != 0) {
|
||||
if (dmu_tx_assign(htx, DMU_TX_WAIT) != 0) {
|
||||
dmu_tx_abort(htx);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ spa_condense_indirect_commit_entry(spa_t *spa,
|
||||
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
dmu_tx_hold_space(tx, sizeof (*vimep) + sizeof (count));
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
int txgoff = dmu_tx_get_txg(tx) & TXG_MASK;
|
||||
|
||||
/*
|
||||
|
||||
@@ -158,7 +158,7 @@ vdev_initialize_change_state(vdev_t *vd, vdev_initializing_state_t new_state)
|
||||
vd->vdev_initialize_state = new_state;
|
||||
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
|
||||
if (new_state != VDEV_INITIALIZE_NONE) {
|
||||
dsl_sync_task_nowait(spa_get_dsl(spa),
|
||||
@@ -250,7 +250,7 @@ vdev_initialize_write(vdev_t *vd, uint64_t start, uint64_t size, abd_t *data)
|
||||
mutex_exit(&vd->vdev_initialize_io_lock);
|
||||
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
uint64_t txg = dmu_tx_get_txg(tx);
|
||||
|
||||
spa_config_enter(spa, SCL_STATE_ALL, vd, RW_READER);
|
||||
|
||||
@@ -4625,7 +4625,7 @@ spa_raidz_expand_thread(void *arg, zthr_t *zthr)
|
||||
dmu_tx_t *tx =
|
||||
dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
uint64_t txg = dmu_tx_get_txg(tx);
|
||||
|
||||
/*
|
||||
|
||||
@@ -287,7 +287,7 @@ vdev_rebuild_initiate(vdev_t *vd)
|
||||
ASSERT(!vd->vdev_rebuilding);
|
||||
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
|
||||
vd->vdev_rebuilding = B_TRUE;
|
||||
|
||||
@@ -592,7 +592,7 @@ vdev_rebuild_range(vdev_rebuild_t *vr, uint64_t start, uint64_t size)
|
||||
mutex_exit(&vr->vr_io_lock);
|
||||
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
uint64_t txg = dmu_tx_get_txg(tx);
|
||||
|
||||
spa_config_enter(spa, SCL_STATE_ALL, vd, RW_READER);
|
||||
@@ -932,7 +932,7 @@ vdev_rebuild_thread(void *arg)
|
||||
|
||||
dsl_pool_t *dp = spa_get_dsl(spa);
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(dp->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
|
||||
mutex_enter(&vd->vdev_rebuild_lock);
|
||||
if (error == 0) {
|
||||
|
||||
@@ -1717,7 +1717,7 @@ spa_vdev_remove_thread(void *arg)
|
||||
dmu_tx_t *tx =
|
||||
dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
uint64_t txg = dmu_tx_get_txg(tx);
|
||||
|
||||
/*
|
||||
|
||||
@@ -342,7 +342,7 @@ vdev_trim_change_state(vdev_t *vd, vdev_trim_state_t new_state,
|
||||
vd->vdev_trim_state = new_state;
|
||||
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
dsl_sync_task_nowait(spa_get_dsl(spa), vdev_trim_zap_update_sync,
|
||||
guid, tx);
|
||||
|
||||
@@ -527,7 +527,7 @@ vdev_trim_range(trim_args_t *ta, uint64_t start, uint64_t size)
|
||||
mutex_exit(&vd->vdev_trim_io_lock);
|
||||
|
||||
dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
uint64_t txg = dmu_tx_get_txg(tx);
|
||||
|
||||
spa_config_enter(spa, SCL_STATE_ALL, vd, RW_READER);
|
||||
|
||||
@@ -340,7 +340,7 @@ zfs_set_userquota(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type,
|
||||
}
|
||||
if (fuid_dirtied)
|
||||
zfs_fuid_txhold(zfsvfs, tx);
|
||||
err = dmu_tx_assign(tx, TXG_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (err) {
|
||||
dmu_tx_abort(tx);
|
||||
return (err);
|
||||
|
||||
@@ -900,7 +900,7 @@ top:
|
||||
|
||||
zp->z_size = end;
|
||||
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error) {
|
||||
zrele(zp);
|
||||
if (error == ERESTART) {
|
||||
|
||||
+1
-1
@@ -265,7 +265,7 @@ zfs_sa_set_xattr(znode_t *zp, const char *name, const void *value, size_t vsize)
|
||||
dmu_tx_hold_sa_create(tx, size);
|
||||
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_TRUE);
|
||||
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
} else {
|
||||
|
||||
@@ -835,7 +835,7 @@ zfs_write(znode_t *zp, zfs_uio_t *uio, int ioflag, cred_t *cr)
|
||||
dmu_tx_hold_write_by_dnode(tx, DB_DNODE(db), woff, nbytes);
|
||||
DB_DNODE_EXIT(db);
|
||||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
if (abuf != NULL)
|
||||
@@ -1660,7 +1660,7 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
|
||||
dmu_tx_hold_clone_by_dnode(tx, DB_DNODE(db), outoff, size);
|
||||
DB_DNODE_EXIT(db);
|
||||
zfs_sa_upgrade_txholds(tx, outzp);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
break;
|
||||
@@ -1827,7 +1827,7 @@ zfs_clone_range_replay(znode_t *zp, uint64_t off, uint64_t len, uint64_t blksz,
|
||||
dmu_tx_hold_clone_by_dnode(tx, DB_DNODE(db), off, len);
|
||||
DB_DNODE_EXIT(db);
|
||||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
zfs_exit(zfsvfs, FTAG);
|
||||
|
||||
+6
-6
@@ -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, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
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, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
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, TXG_WAIT));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
|
||||
dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx);
|
||||
txg = dmu_tx_get_txg(tx);
|
||||
|
||||
@@ -1977,7 +1977,7 @@ 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, TXG_WAIT | TXG_NOTHROTTLE));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_NOTHROTTLE));
|
||||
dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx);
|
||||
uint64_t txg = dmu_tx_get_txg(tx);
|
||||
|
||||
@@ -3454,9 +3454,9 @@ zil_commit_itx_assign(zilog_t *zilog, zil_commit_waiter_t *zcw)
|
||||
* Since we are not going to create any new dirty data, and we
|
||||
* can even help with clearing the existing dirty data, we
|
||||
* should not be subject to the dirty data based delays. We
|
||||
* use TXG_NOTHROTTLE to bypass the delay mechanism.
|
||||
* use DMU_TX_NOTHROTTLE to bypass the delay mechanism.
|
||||
*/
|
||||
VERIFY0(dmu_tx_assign(tx, TXG_WAIT | TXG_NOTHROTTLE));
|
||||
VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_NOTHROTTLE));
|
||||
|
||||
itx_t *itx = zil_itx_create(TX_COMMIT, sizeof (lr_t));
|
||||
itx->itx_sync = B_TRUE;
|
||||
|
||||
+5
-5
@@ -276,7 +276,7 @@ zvol_update_volsize(uint64_t volsize, objset_t *os)
|
||||
tx = dmu_tx_create(os);
|
||||
dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL);
|
||||
dmu_tx_mark_netfree(tx);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
return (SET_ERROR(error));
|
||||
@@ -459,7 +459,7 @@ zvol_replay_truncate(void *arg1, void *arg2, boolean_t byteswap)
|
||||
|
||||
dmu_tx_t *tx = dmu_tx_create(zv->zv_objset);
|
||||
dmu_tx_mark_netfree(tx);
|
||||
int error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
int error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
} else {
|
||||
@@ -506,7 +506,7 @@ zvol_replay_write(void *arg1, void *arg2, boolean_t byteswap)
|
||||
|
||||
tx = dmu_tx_create(os);
|
||||
dmu_tx_hold_write(tx, ZVOL_OBJ, offset, length);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
} else {
|
||||
@@ -557,7 +557,7 @@ zvol_replay_clone_range(void *arg1, void *arg2, boolean_t byteswap)
|
||||
return (error);
|
||||
tx = dmu_tx_create(os);
|
||||
dmu_tx_hold_clone_by_dnode(tx, zv->zv_dn, off, len);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
goto out;
|
||||
@@ -722,7 +722,7 @@ zvol_clone_range(zvol_state_t *zv_src, uint64_t inoff, zvol_state_t *zv_dst,
|
||||
|
||||
tx = dmu_tx_create(zv_dst->zv_objset);
|
||||
dmu_tx_hold_clone_by_dnode(tx, zv_dst->zv_dn, outoff, size);
|
||||
error = dmu_tx_assign(tx, TXG_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||
if (error != 0) {
|
||||
dmu_tx_abort(tx);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user