summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2014-01-16 16:15:38 +0000
committeravg <avg@FreeBSD.org>2014-01-16 16:15:38 +0000
commitc80798a63fccbfab3e6400c391eab5f21c02474c (patch)
tree2be75a68bc06a3aea06b84e2842d1e10cc22cfdc /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
parentf06ee197d04358d8251153c415df32f0d899467d (diff)
downloadFreeBSD-src-c80798a63fccbfab3e6400c391eab5f21c02474c.zip
FreeBSD-src-c80798a63fccbfab3e6400c391eab5f21c02474c.tar.gz
MFC r258720: MFV r258665: 4347 ZPL can use dmu_tx_assign(TXG_WAIT)
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
index ebb3337..a3a1338 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
@@ -1536,7 +1536,6 @@ zfs_extend(znode_t *zp, uint64_t end)
zfs_range_unlock(rl);
return (0);
}
-top:
tx = dmu_tx_create(zfsvfs->z_os);
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
zfs_sa_upgrade_txholds(tx, zp);
@@ -1556,13 +1555,8 @@ top:
newblksz = 0;
}
- error = dmu_tx_assign(tx, TXG_NOWAIT);
+ error = dmu_tx_assign(tx, TXG_WAIT);
if (error) {
- if (error == ERESTART) {
- dmu_tx_wait(tx);
- dmu_tx_abort(tx);
- goto top;
- }
dmu_tx_abort(tx);
zfs_range_unlock(rl);
return (error);
@@ -1670,17 +1664,11 @@ zfs_trunc(znode_t *zp, uint64_t end)
zfs_range_unlock(rl);
return (error);
}
-top:
tx = dmu_tx_create(zfsvfs->z_os);
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
zfs_sa_upgrade_txholds(tx, zp);
- error = dmu_tx_assign(tx, TXG_NOWAIT);
+ error = dmu_tx_assign(tx, TXG_WAIT);
if (error) {
- if (error == ERESTART) {
- dmu_tx_wait(tx);
- dmu_tx_abort(tx);
- goto top;
- }
dmu_tx_abort(tx);
zfs_range_unlock(rl);
return (error);
@@ -1771,13 +1759,8 @@ log:
tx = dmu_tx_create(zfsvfs->z_os);
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
zfs_sa_upgrade_txholds(tx, zp);
- error = dmu_tx_assign(tx, TXG_NOWAIT);
+ error = dmu_tx_assign(tx, TXG_WAIT);
if (error) {
- if (error == ERESTART) {
- dmu_tx_wait(tx);
- dmu_tx_abort(tx);
- goto log;
- }
dmu_tx_abort(tx);
return (error);
}
OpenPOWER on IntegriCloud