summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_replay.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-12-22 10:07:03 -0800
committerBrian Behlendorf <[email protected]>2011-02-10 09:21:43 -0800
commitab892c5f0ad7c2ee291693cf61dfc9601a2472d0 (patch)
tree9a185fa6b5725c5a64093c52adae35a5210379fc /module/zfs/zfs_replay.c
parent590329b50cda53cad87a4222d55cdbb35bfcf494 (diff)
Replace VOP_* calls with direct zfs_* calls
These generic Solaris wrappers are no longer required. Simply directly call the correct zfs functions for clarity.
Diffstat (limited to 'module/zfs/zfs_replay.c')
-rw-r--r--module/zfs/zfs_replay.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/module/zfs/zfs_replay.c b/module/zfs/zfs_replay.c
index bd29ab9a1..2c258948b 100644
--- a/module/zfs/zfs_replay.c
+++ b/module/zfs/zfs_replay.c
@@ -41,6 +41,7 @@
#include <sys/zfs_fuid.h>
#include <sys/spa.h>
#include <sys/zil.h>
+#include <sys/zfs_vnops.h>
#include <sys/byteorder.h>
#include <sys/stat.h>
#include <sys/mode.h>
@@ -310,7 +311,7 @@ zfs_replay_create_acl(zfsvfs_t *zfsvfs,
/*
* All forms of zfs create (create, mkdir, mkxattrdir, symlink)
* eventually end up in zfs_mknode(), which assigns the object's
- * creation time and generation number. The generic VOP_CREATE()
+ * creation time and generation number. The generic zfs_create()
* doesn't have either concept, so we smuggle the values inside
* the vattr's otherwise unused va_ctime and va_nblocks fields.
*/
@@ -353,7 +354,7 @@ zfs_replay_create_acl(zfsvfs_t *zfsvfs,
lr->lr_uid, lr->lr_gid);
}
- error = VOP_CREATE(ZTOV(dzp), name, &xva.xva_vattr,
+ error = zfs_create(ZTOV(dzp), name, &xva.xva_vattr,
0, 0, &vp, kcred, vflg, NULL, &vsec);
break;
case TX_MKDIR_ACL:
@@ -383,7 +384,7 @@ zfs_replay_create_acl(zfsvfs_t *zfsvfs,
(void *)&name, lracl->lr_fuidcnt, lracl->lr_domcnt,
lr->lr_uid, lr->lr_gid);
}
- error = VOP_MKDIR(ZTOV(dzp), name, &xva.xva_vattr,
+ error = zfs_mkdir(ZTOV(dzp), name, &xva.xva_vattr,
&vp, kcred, NULL, vflg, &vsec);
break;
default:
@@ -437,7 +438,7 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
/*
* All forms of zfs create (create, mkdir, mkxattrdir, symlink)
* eventually end up in zfs_mknode(), which assigns the object's
- * creation time and generation number. The generic VOP_CREATE()
+ * creation time and generation number. The generic zfs_create()
* doesn't have either concept, so we smuggle the values inside
* the vattr's otherwise unused va_ctime and va_nblocks fields.
*/
@@ -482,7 +483,7 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
if (name == NULL)
name = (char *)start;
- error = VOP_CREATE(ZTOV(dzp), name, &xva.xva_vattr,
+ error = zfs_create(ZTOV(dzp), name, &xva.xva_vattr,
0, 0, &vp, kcred, vflg, NULL, NULL);
break;
case TX_MKDIR_ATTR:
@@ -500,7 +501,7 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
if (name == NULL)
name = (char *)(lr + 1);
- error = VOP_MKDIR(ZTOV(dzp), name, &xva.xva_vattr,
+ error = zfs_mkdir(ZTOV(dzp), name, &xva.xva_vattr,
&vp, kcred, NULL, vflg, NULL);
break;
case TX_MKXATTR:
@@ -509,7 +510,7 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
case TX_SYMLINK:
name = (char *)(lr + 1);
link = name + strlen(name) + 1;
- error = VOP_SYMLINK(ZTOV(dzp), name, &xva.xva_vattr,
+ error = zfs_symlink(ZTOV(dzp), name, &xva.xva_vattr,
link, kcred, NULL, vflg);
break;
default:
@@ -547,10 +548,10 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap)
switch ((int)lr->lr_common.lrc_txtype) {
case TX_REMOVE:
- error = VOP_REMOVE(ZTOV(dzp), name, kcred, NULL, vflg);
+ error = zfs_remove(ZTOV(dzp), name, kcred, NULL, vflg);
break;
case TX_RMDIR:
- error = VOP_RMDIR(ZTOV(dzp), name, NULL, kcred, NULL, vflg);
+ error = zfs_rmdir(ZTOV(dzp), name, NULL, kcred, NULL, vflg);
break;
default:
error = ENOTSUP;
@@ -583,7 +584,7 @@ zfs_replay_link(zfsvfs_t *zfsvfs, lr_link_t *lr, boolean_t byteswap)
if (lr->lr_common.lrc_txtype & TX_CI)
vflg |= FIGNORECASE;
- error = VOP_LINK(ZTOV(dzp), ZTOV(zp), name, kcred, NULL, vflg);
+ error = zfs_link(ZTOV(dzp), ZTOV(zp), name, kcred, NULL, vflg);
VN_RELE(ZTOV(zp));
VN_RELE(ZTOV(dzp));
@@ -614,7 +615,7 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
if (lr->lr_common.lrc_txtype & TX_CI)
vflg |= FIGNORECASE;
- error = VOP_RENAME(ZTOV(sdzp), sname, ZTOV(tdzp), tname, kcred,
+ error = zfs_rename(ZTOV(sdzp), sname, ZTOV(tdzp), tname, kcred,
NULL, vflg);
VN_RELE(ZTOV(tdzp));
@@ -753,7 +754,7 @@ zfs_replay_truncate(zfsvfs_t *zfsvfs, lr_truncate_t *lr, boolean_t byteswap)
fl.l_start = lr->lr_offset;
fl.l_len = lr->lr_length;
- error = VOP_SPACE(ZTOV(zp), F_FREESP, &fl, FWRITE | FOFFMAX,
+ error = zfs_space(ZTOV(zp), F_FREESP, &fl, FWRITE | FOFFMAX,
lr->lr_offset, kcred, NULL);
VN_RELE(ZTOV(zp));
@@ -804,7 +805,7 @@ zfs_replay_setattr(zfsvfs_t *zfsvfs, lr_setattr_t *lr, boolean_t byteswap)
zfsvfs->z_fuid_replay = zfs_replay_fuid_domain(start, &start,
lr->lr_uid, lr->lr_gid);
- error = VOP_SETATTR(ZTOV(zp), vap, 0, kcred, NULL);
+ error = zfs_setattr(ZTOV(zp), vap, 0, kcred, NULL);
zfs_fuid_info_free(zfsvfs->z_fuid_replay);
zfsvfs->z_fuid_replay = NULL;
@@ -836,7 +837,7 @@ zfs_replay_acl_v0(zfsvfs_t *zfsvfs, lr_acl_v0_t *lr, boolean_t byteswap)
vsa.vsa_aclflags = 0;
vsa.vsa_aclentp = ace;
- error = VOP_SETSECATTR(ZTOV(zp), &vsa, 0, kcred, NULL);
+ error = zfs_setsecattr(ZTOV(zp), &vsa, 0, kcred, NULL);
VN_RELE(ZTOV(zp));
@@ -894,7 +895,7 @@ zfs_replay_acl(zfsvfs_t *zfsvfs, lr_acl_t *lr, boolean_t byteswap)
lr->lr_fuidcnt, lr->lr_domcnt, 0, 0);
}
- error = VOP_SETSECATTR(ZTOV(zp), &vsa, 0, kcred, NULL);
+ error = zfs_setsecattr(ZTOV(zp), &vsa, 0, kcred, NULL);
if (zfsvfs->z_fuid_replay)
zfs_fuid_info_free(zfsvfs->z_fuid_replay);