vnops: thread DMU_TX_ASSIGN_CONTINUE to a bunch of vnops
These are ones that I'm reasonably sure connect to a real syscall and have a reasonable error response. I've left stuff like `dirty_inode`, `zfs_inactive`, etc, which are internal kernel housekeeping things, as well as anything that looks like it belongs to zvols, ioctls, admin commands, etc. Signed-off-by: Rob Norris <rob.norris@klarasystems.com> (cherry picked from commit 39c2801c611e27b521d716fea8f771307820362e)
This commit is contained in:
parent
aea007e336
commit
7b7af8ba02
|
@ -827,7 +827,7 @@ zfs_make_xattrdir(znode_t *zp, vattr_t *vap, znode_t **xvpp, cred_t *cr)
|
|||
fuid_dirtied = zfsvfs->z_fuid_dirty;
|
||||
if (fuid_dirtied)
|
||||
zfs_fuid_txhold(zfsvfs, tx);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
zfs_acl_ids_free(&acl_ids);
|
||||
dmu_tx_abort(tx);
|
||||
|
|
|
@ -1164,7 +1164,7 @@ zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl, int mode,
|
|||
dmu_tx_hold_write(tx, DMU_NEW_OBJECT,
|
||||
0, acl_ids.z_aclp->z_acl_bytes);
|
||||
}
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
zfs_acl_ids_free(&acl_ids);
|
||||
dmu_tx_abort(tx);
|
||||
|
@ -1289,7 +1289,7 @@ zfs_remove_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
|
|||
*/
|
||||
dmu_tx_mark_netfree(tx);
|
||||
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
ZFS_EXIT(zfsvfs);
|
||||
|
@ -1504,7 +1504,7 @@ zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, znode_t **zpp,
|
|||
dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes +
|
||||
ZFS_SA_BASE_ATTR_SIZE);
|
||||
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
zfs_acl_ids_free(&acl_ids);
|
||||
dmu_tx_abort(tx);
|
||||
|
@ -1607,7 +1607,7 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
|
|||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
zfs_sa_upgrade_txholds(tx, dzp);
|
||||
dmu_tx_mark_netfree(tx);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
ZFS_EXIT(zfsvfs);
|
||||
|
@ -2696,7 +2696,7 @@ zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr)
|
|||
|
||||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
|
||||
err = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
@ -3398,7 +3398,7 @@ zfs_do_rename_impl(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
|
|||
|
||||
zfs_sa_upgrade_txholds(tx, szp);
|
||||
dmu_tx_hold_zap(tx, zfsvfs->z_unlinkedobj, FALSE, NULL);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
goto out_seq;
|
||||
|
@ -3594,7 +3594,7 @@ zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
|
|||
}
|
||||
if (fuid_dirtied)
|
||||
zfs_fuid_txhold(zfsvfs, tx);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
zfs_acl_ids_free(&acl_ids);
|
||||
dmu_tx_abort(tx);
|
||||
|
@ -3799,7 +3799,7 @@ zfs_link(znode_t *tdzp, znode_t *szp, const char *name, cred_t *cr,
|
|||
dmu_tx_hold_zap(tx, tdzp->z_id, TRUE, name);
|
||||
zfs_sa_upgrade_txholds(tx, szp);
|
||||
zfs_sa_upgrade_txholds(tx, tdzp);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
ZFS_EXIT(zfsvfs);
|
||||
|
|
|
@ -1428,7 +1428,7 @@ zfs_extend(znode_t *zp, uint64_t end)
|
|||
newblksz = 0;
|
||||
}
|
||||
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
zfs_rangelock_exit(lr);
|
||||
|
@ -1546,7 +1546,7 @@ zfs_trunc(znode_t *zp, uint64_t end)
|
|||
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
|
||||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
dmu_tx_mark_netfree(tx);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
zfs_rangelock_exit(lr);
|
||||
|
@ -1627,7 +1627,7 @@ 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, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
return (error);
|
||||
|
|
|
@ -1084,7 +1084,7 @@ zfs_make_xattrdir(znode_t *zp, vattr_t *vap, znode_t **xzpp, cred_t *cr)
|
|||
fuid_dirtied = zfsvfs->z_fuid_dirty;
|
||||
if (fuid_dirtied)
|
||||
zfs_fuid_txhold(zfsvfs, tx);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
zfs_acl_ids_free(&acl_ids);
|
||||
dmu_tx_abort(tx);
|
||||
|
|
|
@ -2327,7 +2327,7 @@ top:
|
|||
|
||||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
|
||||
err = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
err = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
|
|
@ -1528,7 +1528,7 @@ zfs_extend(znode_t *zp, uint64_t end)
|
|||
newblksz = 0;
|
||||
}
|
||||
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
zfs_rangelock_exit(lr);
|
||||
|
@ -1714,7 +1714,7 @@ zfs_trunc(znode_t *zp, uint64_t end)
|
|||
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
|
||||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
dmu_tx_mark_netfree(tx);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
zfs_rangelock_exit(lr);
|
||||
|
@ -1785,7 +1785,7 @@ 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, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
goto out;
|
||||
|
|
|
@ -248,7 +248,7 @@ zfs_sa_set_xattr(znode_t *zp)
|
|||
dmu_tx_hold_sa_create(tx, size);
|
||||
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_TRUE);
|
||||
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
} else {
|
||||
|
|
|
@ -556,7 +556,8 @@ zfs_write(znode_t *zp, zfs_uio_t *uio, int ioflag, cred_t *cr)
|
|||
MIN(n, max_blksz));
|
||||
DB_DNODE_EXIT(db);
|
||||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
error = dmu_tx_assign(tx, DMU_TX_ASSIGN_WAIT);
|
||||
error = dmu_tx_assign(tx,
|
||||
DMU_TX_ASSIGN_WAIT | DMU_TX_ASSIGN_CONTINUE);
|
||||
if (error) {
|
||||
dmu_tx_abort(tx);
|
||||
if (abuf != NULL)
|
||||
|
|
Loading…
Reference in New Issue