Rebase master to b105

This commit is contained in:
Brian Behlendorf
2009-01-15 13:59:39 -08:00
parent 42bcb36c89
commit fb5f0bc833
50 changed files with 1602 additions and 849 deletions
+4 -22
View File
@@ -561,24 +561,6 @@ zfs_rmnode(znode_t *zp)
ASSERT(ZTOV(zp)->v_count == 0);
ASSERT(zp->z_phys->zp_links == 0);
/*
* If this is a ZIL replay then leave the object in the unlinked set.
* Otherwise we can get a deadlock, because the delete can be
* quite large and span multiple tx's and txgs, but each replay
* creates a tx to atomically run the replay function and mark the
* replay record as complete. We deadlock trying to start a tx in
* a new txg to further the deletion but can't because the replay
* tx hasn't finished.
*
* We actually delete the object if we get a failure to create an
* object in zil_replay_log_record(), or after calling zil_replay().
*/
if (zfsvfs->z_assign >= TXG_INITIAL) {
zfs_znode_dmu_fini(zp);
zfs_znode_free(zp);
return;
}
/*
* If this is an attribute directory, purge its contents.
*/
@@ -845,9 +827,9 @@ zfs_make_xattrdir(znode_t *zp, vattr_t *vap, vnode_t **xvpp, cred_t *cr)
FUID_SIZE_ESTIMATE(zfsvfs));
}
}
error = dmu_tx_assign(tx, zfsvfs->z_assign);
error = dmu_tx_assign(tx, TXG_NOWAIT);
if (error) {
if (error == ERESTART && zfsvfs->z_assign == TXG_NOWAIT)
if (error == ERESTART)
dmu_tx_wait(tx);
dmu_tx_abort(tx);
return (error);
@@ -930,7 +912,7 @@ top:
error = zfs_make_xattrdir(zp, &va, xvpp, cr);
zfs_dirent_unlock(dl);
if (error == ERESTART && zfsvfs->z_assign == TXG_NOWAIT) {
if (error == ERESTART) {
/* NB: we already did dmu_tx_wait() if necessary */
goto top;
}
@@ -959,7 +941,7 @@ zfs_sticky_remove_access(znode_t *zdp, znode_t *zp, cred_t *cr)
uid_t fowner;
zfsvfs_t *zfsvfs = zdp->z_zfsvfs;
if (zdp->z_zfsvfs->z_assign >= TXG_INITIAL) /* ZIL replay */
if (zdp->z_zfsvfs->z_replay)
return (0);
if ((zdp->z_phys->zp_mode & S_ISVTX) == 0)