Lines Matching refs:tx

109  *	cached atime changes.  Third, zfs_zinactive() may require a new tx,
111 * If you must call VN_RELE() within a tx then use VN_RELE_ASYNC().
126 * the tx assigns, and sometimes after (e.g. z_lock), then failing
130 * Thread B is in an already-assigned tx, and blocks for this lock.
132 * forever, because the previous txg can't quiesce until B's tx commits.
147 * (6) At the end of each vnode op, the DMU tx must always commit,
159 * tx = dmu_tx_create(...); // get DMU tx
161 * error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
168 * dmu_tx_wait(tx);
169 * dmu_tx_abort(tx);
172 * dmu_tx_abort(tx); // abort DMU tx
179 * dmu_tx_commit(tx); // commit DMU tx -- error or not
659 dmu_tx_t *tx;
847 tx = dmu_tx_create(zfsvfs->z_os);
848 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
849 dmu_tx_hold_write(tx, zp->z_id, woff, MIN(n, max_blksz));
850 zfs_sa_upgrade_txholds(tx, zp);
851 error = dmu_tx_assign(tx, TXG_WAIT);
853 dmu_tx_abort(tx);
880 zfs_grow_blocksize(zp, new_blksz, tx);
893 uio, nbytes, tx);
908 aiov->iov_len, aiov->iov_base, tx);
914 woff, abuf, tx);
930 (void *)&zp->z_size, sizeof (uint64_t), tx);
931 dmu_tx_commit(tx);
957 (void *)&newmode, sizeof (uint64_t), tx);
981 error = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
983 zfs_log_write(zilog, tx, TX_WRITE, zp, woff, tx_bytes, ioflag);
984 dmu_tx_commit(tx);
1384 dmu_tx_t *tx;
1498 tx = dmu_tx_create(os);
1500 dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes +
1505 zfs_fuid_txhold(zfsvfs, tx);
1506 dmu_tx_hold_zap(tx, dzp->z_id, TRUE, name);
1507 dmu_tx_hold_sa(tx, dzp->z_sa_hdl, B_FALSE);
1510 dmu_tx_hold_write(tx, DMU_NEW_OBJECT,
1513 error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
1518 dmu_tx_wait(tx);
1519 dmu_tx_abort(tx);
1523 dmu_tx_abort(tx);
1527 zfs_mknode(dzp, vap, tx, cr, 0, &zp, &acl_ids);
1530 zfs_fuid_sync(zfsvfs, tx);
1532 (void) zfs_link_create(dl, zp, tx, ZNEW);
1536 zfs_log_create(zilog, tx, txtype, dzp, zp, name,
1539 dmu_tx_commit(tx);
1641 dmu_tx_t *tx;
1707 tx = dmu_tx_create(zfsvfs->z_os);
1708 dmu_tx_hold_zap(tx, dzp->z_id, FALSE, name);
1709 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
1710 zfs_sa_upgrade_txholds(tx, zp);
1711 zfs_sa_upgrade_txholds(tx, dzp);
1716 dmu_tx_hold_free(tx, zp->z_id, 0,
1726 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_TRUE);
1727 dmu_tx_hold_sa(tx, xzp->z_sa_hdl, B_FALSE);
1732 dmu_tx_hold_free(tx, acl_obj, 0, DMU_OBJECT_END);
1736 dmu_tx_hold_zap(tx, zfsvfs->z_unlinkedobj, FALSE, NULL);
1741 dmu_tx_mark_netfree(tx);
1743 error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
1751 dmu_tx_wait(tx);
1752 dmu_tx_abort(tx);
1757 dmu_tx_abort(tx);
1765 error = zfs_link_destroy(dl, zp, tx, zflg, &unlinked);
1768 dmu_tx_commit(tx);
1796 &xzp->z_links, sizeof (xzp->z_links), tx);
1799 zfs_unlinked_add(xzp, tx);
1803 SA_ZPL_XATTR(zfsvfs), tx);
1807 sizeof (uint64_t), tx);
1815 zfs_znode_delete(zp, tx);
1818 zfs_unlinked_add(zp, tx);
1824 zfs_log_remove(zilog, tx, txtype, dzp, name, obj);
1826 dmu_tx_commit(tx);
1875 dmu_tx_t *tx;
1966 tx = dmu_tx_create(zfsvfs->z_os);
1967 dmu_tx_hold_zap(tx, dzp->z_id, TRUE, dirname);
1968 dmu_tx_hold_zap(tx, DMU_NEW_OBJECT, FALSE, NULL);
1971 zfs_fuid_txhold(zfsvfs, tx);
1973 dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0,
1977 dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes +
1980 error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
1985 dmu_tx_wait(tx);
1986 dmu_tx_abort(tx);
1990 dmu_tx_abort(tx);
1998 zfs_mknode(dzp, vap, tx, cr, 0, &zp, &acl_ids);
2001 zfs_fuid_sync(zfsvfs, tx);
2006 (void) zfs_link_create(dl, zp, tx, ZNEW);
2013 zfs_log_create(zilog, tx, txtype, dzp, zp, dirname, vsecp,
2018 dmu_tx_commit(tx);
2057 dmu_tx_t *tx;
2110 tx = dmu_tx_create(zfsvfs->z_os);
2111 dmu_tx_hold_zap(tx, dzp->z_id, FALSE, name);
2112 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
2113 dmu_tx_hold_zap(tx, zfsvfs->z_unlinkedobj, FALSE, NULL);
2114 zfs_sa_upgrade_txholds(tx, zp);
2115 zfs_sa_upgrade_txholds(tx, dzp);
2116 dmu_tx_mark_netfree(tx);
2117 error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
2125 dmu_tx_wait(tx);
2126 dmu_tx_abort(tx);
2129 dmu_tx_abort(tx);
2134 error = zfs_link_destroy(dl, zp, tx, zflg, NULL);
2140 zfs_log_remove(zilog, tx, txtype, dzp, name, ZFS_NO_OBJECT);
2143 dmu_tx_commit(tx);
2709 dmu_tx_t *tx;
3064 tx = dmu_tx_create(zfsvfs->z_os);
3089 dmu_tx_hold_free(tx, acl_obj, 0,
3091 dmu_tx_hold_write(tx, DMU_NEW_OBJECT,
3094 dmu_tx_hold_write(tx, acl_obj, 0,
3098 dmu_tx_hold_write(tx, DMU_NEW_OBJECT,
3102 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_TRUE);
3106 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_TRUE);
3108 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
3112 dmu_tx_hold_sa(tx, attrzp->z_sa_hdl, B_FALSE);
3117 zfs_fuid_txhold(zfsvfs, tx);
3119 zfs_sa_upgrade_txholds(tx, zp);
3121 err = dmu_tx_assign(tx, TXG_WAIT);
3194 err = zfs_aclset_common(zp, aclp, cr, tx);
3270 zfs_xvattr_set(zp, xvap, tx);
3274 zfs_fuid_sync(zfsvfs, tx);
3277 zfs_log_setattr(zilog, tx, TX_SETATTR, zp, vap, mask, fuidp);
3291 xattr_count, tx);
3307 dmu_tx_abort(tx);
3311 err2 = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
3312 dmu_tx_commit(tx);
3448 dmu_tx_t *tx;
3675 tx = dmu_tx_create(zfsvfs->z_os);
3676 dmu_tx_hold_sa(tx, szp->z_sa_hdl, B_FALSE);
3677 dmu_tx_hold_sa(tx, sdzp->z_sa_hdl, B_FALSE);
3678 dmu_tx_hold_zap(tx, sdzp->z_id, FALSE, snm);
3679 dmu_tx_hold_zap(tx, tdzp->z_id, TRUE, tnm);
3681 dmu_tx_hold_sa(tx, tdzp->z_sa_hdl, B_FALSE);
3682 zfs_sa_upgrade_txholds(tx, tdzp);
3685 dmu_tx_hold_sa(tx, tzp->z_sa_hdl, B_FALSE);
3686 zfs_sa_upgrade_txholds(tx, tzp);
3689 zfs_sa_upgrade_txholds(tx, szp);
3690 dmu_tx_hold_zap(tx, zfsvfs->z_unlinkedobj, FALSE, NULL);
3691 error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
3706 dmu_tx_wait(tx);
3707 dmu_tx_abort(tx);
3710 dmu_tx_abort(tx);
3716 error = rm_err = zfs_link_destroy(tdl, tzp, tx, zflg, NULL);
3719 error = zfs_link_create(tdl, szp, tx, ZRENAMING);
3724 (void *)&szp->z_pflags, sizeof (uint64_t), tx);
3727 error = zfs_link_destroy(sdl, szp, tx, ZRENAMING, NULL);
3729 zfs_log_rename(zilog, tx, TX_RENAME |
3751 VERIFY3U(zfs_link_destroy(tdl, szp, tx,
3757 dmu_tx_commit(tx);
3812 dmu_tx_t *tx;
3871 tx = dmu_tx_create(zfsvfs->z_os);
3873 dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, MAX(1, len));
3874 dmu_tx_hold_zap(tx, dzp->z_id, TRUE, name);
3875 dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes +
3877 dmu_tx_hold_sa(tx, dzp->z_sa_hdl, B_FALSE);
3879 dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0,
3883 zfs_fuid_txhold(zfsvfs, tx);
3884 error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
3889 dmu_tx_wait(tx);
3890 dmu_tx_abort(tx);
3894 dmu_tx_abort(tx);
3903 zfs_mknode(dzp, vap, tx, cr, 0, &zp, &acl_ids);
3906 zfs_fuid_sync(zfsvfs, tx);
3911 link, len, tx);
3913 zfs_sa_symlink(zp, link, len, tx);
3918 &zp->z_size, sizeof (zp->z_size), tx);
3922 (void) zfs_link_create(dl, zp, tx, ZNEW);
3926 zfs_log_symlink(zilog, tx, txtype, dzp, zp, name, link);
3930 dmu_tx_commit(tx);
4009 dmu_tx_t *tx;
4100 tx = dmu_tx_create(zfsvfs->z_os);
4101 dmu_tx_hold_sa(tx, szp->z_sa_hdl, B_FALSE);
4102 dmu_tx_hold_zap(tx, dzp->z_id, TRUE, name);
4103 zfs_sa_upgrade_txholds(tx, szp);
4104 zfs_sa_upgrade_txholds(tx, dzp);
4105 error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
4110 dmu_tx_wait(tx);
4111 dmu_tx_abort(tx);
4114 dmu_tx_abort(tx);
4119 error = zfs_link_create(dl, szp, tx, 0);
4125 zfs_log_link(zilog, tx, txtype, dzp, szp, name);
4128 dmu_tx_commit(tx);
4180 dmu_tx_t *tx;
4225 tx = dmu_tx_create(zfsvfs->z_os);
4226 dmu_tx_hold_write(tx, zp->z_id, off, len);
4228 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
4229 zfs_sa_upgrade_txholds(tx, zp);
4230 err = dmu_tx_assign(tx, TXG_WAIT);
4232 dmu_tx_abort(tx);
4239 dmu_write(zfsvfs->z_os, zp->z_id, off, len, va, tx);
4242 err = dmu_write_pages(zfsvfs->z_os, zp->z_id, off, len, pp, tx);
4258 zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len, 0);
4260 dmu_tx_commit(tx);
4419 dmu_tx_t *tx = dmu_tx_create(zfsvfs->z_os);
4421 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
4422 zfs_sa_upgrade_txholds(tx, zp);
4423 error = dmu_tx_assign(tx, TXG_WAIT);
4425 dmu_tx_abort(tx);
4429 (void *)&zp->z_atime, sizeof (zp->z_atime), tx);
4432 dmu_tx_commit(tx);