diff options
author | njl <njl@FreeBSD.org> | 2002-09-14 09:02:28 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2002-09-14 09:02:28 +0000 |
commit | 0590c43070aac7fb636a1f4c4b94469046a317a0 (patch) | |
tree | e9205d0e4985af46af0db4bd26e9662b1c25f85b /sys/kern/vfs_subr.c | |
parent | bb76739de046ae1f81a36e96d18f0ee3b1afd323 (diff) | |
download | FreeBSD-src-0590c43070aac7fb636a1f4c4b94469046a317a0.zip FreeBSD-src-0590c43070aac7fb636a1f4c4b94469046a317a0.tar.gz |
Remove all use of vnode->v_tag, replacing with appropriate substitutes.
v_tag is now const char * and should only be used for debugging.
Additionally:
1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK
2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which
is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP.
Suggested by: phk
Reviewed by: bde, rwatson (earlier version)
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index b0be385..933a17f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -792,7 +792,7 @@ done: */ int getnewvnode(tag, mp, vops, vpp) - enum vtagtype tag; + const char *tag; struct mount *mp; vop_t **vops; struct vnode **vpp; @@ -1591,14 +1591,16 @@ sched_sync(void) s = splbio(); if (LIST_FIRST(slp) == vp) { /* - * Note: v_tag VT_VFS vps can remain on the + * Note: VFS vnodes can remain on the * worklist too with no dirty blocks, but * since sync_fsync() moves it to a different * slot we are safe. */ if (TAILQ_EMPTY(&vp->v_dirtyblkhd) && - !vn_isdisk(vp, NULL)) - panic("sched_sync: fsync failed vp %p tag %d", vp, vp->v_tag); + !vn_isdisk(vp, NULL)) { + panic("sched_sync: fsync failed " + "vp %p tag %s", vp, vp->v_tag); + } /* * Put us back on the worklist. The worklist * routine will remove us from our current @@ -1812,7 +1814,7 @@ bdevvp(dev, vpp) } if (vfinddev(dev, VCHR, vpp)) return (0); - error = getnewvnode(VT_NON, (struct mount *)0, spec_vnodeop_p, &nvp); + error = getnewvnode("none", (struct mount *)0, spec_vnodeop_p, &nvp); if (error) { *vpp = NULLVP; return (error); @@ -2382,7 +2384,7 @@ vclean(vp, flags, td) vp->v_op = dead_vnodeop_p; if (vp->v_pollinfo != NULL) vn_pollgone(vp); - vp->v_tag = VT_NON; + vp->v_tag = "none"; vp->v_iflag &= ~VI_XLOCK; vp->v_vxproc = NULL; if (vp->v_iflag & VI_XWANT) { @@ -3190,7 +3192,7 @@ vfs_allocate_syncvnode(mp) int error; /* Allocate a new vnode */ - if ((error = getnewvnode(VT_VFS, mp, sync_vnodeop_p, &vp)) != 0) { + if ((error = getnewvnode("vfs", mp, sync_vnodeop_p, &vp)) != 0) { mp->mnt_syncer = NULL; return (error); } |