Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs SAVENAME and HASB...
details: https://anonhg.NetBSD.org/src/rev/e64c30c210e2
branches: trunk
changeset: 759131:e64c30c210e2
user: dholland <dholland%NetBSD.org@localhost>
date: Tue Nov 30 10:45:27 2010 +0000
description:
SAVENAME and HASBUF namei flags have been abolished; update zfs to match.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c | 10 ++++----
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c | 19 +---------------
2 files changed, 7 insertions(+), 22 deletions(-)
diffs (130 lines):
diff -r 49321f2c8585 -r e64c30c210e2 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c Tue Nov 30 10:44:44 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c Tue Nov 30 10:45:27 2010 +0000
@@ -474,7 +474,7 @@
}
cn.cn_cred = kcred;
- cn.cn_flags = SAVENAME;
+ cn.cn_flags = 0;
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
switch (txtype) {
@@ -563,7 +563,7 @@
cn.cn_nameptr = name;
cn.cn_namelen = strlen(name);
cn.cn_nameiop = DELETE;
- cn.cn_flags = ISLASTCN | SAVENAME;
+ cn.cn_flags = ISLASTCN;
//cn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
cn.cn_cred = kcred;
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
@@ -615,7 +615,7 @@
vflg |= FIGNORECASE;
cn.cn_nameptr = name;
cn.cn_cred = kcred;
- cn.cn_flags = SAVENAME;
+ cn.cn_flags = 0;
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
vn_lock(ZTOV(zp), LK_EXCLUSIVE | LK_RETRY);
@@ -659,7 +659,7 @@
scn.cn_nameptr = sname;
scn.cn_namelen = strlen(sname);
scn.cn_nameiop = DELETE;
- scn.cn_flags = ISLASTCN | SAVENAME;
+ scn.cn_flags = ISLASTCN;
// scn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
scn.cn_cred = kcred;
vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY);
@@ -672,7 +672,7 @@
tcn.cn_nameptr = tname;
tcn.cn_namelen = strlen(tname);
tcn.cn_nameiop = RENAME;
- tcn.cn_flags = ISLASTCN | SAVENAME;
+ tcn.cn_flags = ISLASTCN;
// tcn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
tcn.cn_cred = kcred;
vn_lock(ZTOV(tdzp), LK_EXCLUSIVE | LK_RETRY);
diff -r 49321f2c8585 -r e64c30c210e2 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Tue Nov 30 10:44:44 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Tue Nov 30 10:45:27 2010 +0000
@@ -1331,13 +1331,10 @@
case RENAME:
if (error == ENOENT) {
error = EJUSTRETURN;
- cnp->cn_flags |= SAVENAME;
break;
}
/* FALLTHROUGH */
case DELETE:
- if (error == 0)
- cnp->cn_flags |= SAVENAME;
break;
}
}
@@ -4863,8 +4860,6 @@
vattr_t *vap = ap->a_vap;
int mode;
- ASSERT(cnp->cn_flags & SAVENAME);
-
vattr_init_mask(vap);
mode = vap->va_mode & ALLPERMS;
@@ -4876,8 +4871,6 @@
zfs_netbsd_remove(struct vop_remove_args *ap)
{
- ASSERT(ap->a_cnp->cn_flags & SAVENAME);
-
return (zfs_remove(ap->a_dvp, (char *)ap->a_cnp->cn_nameptr,
ap->a_cnp->cn_cred, NULL, 0));
}
@@ -4887,8 +4880,6 @@
{
vattr_t *vap = ap->a_vap;
- ASSERT(ap->a_cnp->cn_flags & SAVENAME);
-
vattr_init_mask(vap);
return (zfs_mkdir(ap->a_dvp, (char *)ap->a_cnp->cn_nameptr, vap, ap->a_vpp,
@@ -4900,8 +4891,6 @@
{
struct componentname *cnp = ap->a_cnp;
- ASSERT(cnp->cn_flags & SAVENAME);
-
return (zfs_rmdir(ap->a_dvp, (char *)cnp->cn_nameptr, NULL, cnp->cn_cred, NULL, 0));
}
@@ -5053,8 +5042,8 @@
vnode_t *tvp = ap->a_tvp;
int error;
- ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART));
- ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART));
+ ASSERT(ap->a_fcnp->cn_flags & SAVESTART);
+ ASSERT(ap->a_tcnp->cn_flags & SAVESTART);
error = zfs_rename(fdvp, (char *)ap->a_fcnp->cn_nameptr, tdvp,
(char *)ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0);
@@ -5077,8 +5066,6 @@
struct componentname *cnp = ap->a_cnp;
vattr_t *vap = ap->a_vap;
- ASSERT(cnp->cn_flags & SAVENAME);
-
vap->va_type = VLNK; /* Netbsd: Syscall only sets va_mode. */
vattr_init_mask(vap);
@@ -5264,8 +5251,6 @@
{
struct componentname *cnp = ap->a_cnp;
- ASSERT(cnp->cn_flags & SAVENAME);
-
return (zfs_link(ap->a_dvp, ap->a_vp, (char *)cnp->cn_nameptr, cnp->cn_cred, NULL, 0));
}
Home |
Main Index |
Thread Index |
Old Index