diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1994-05-25 09:21:21 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1994-05-25 09:21:21 +0000 |
commit | 2469c867a164210ce96143517059f21db7f1fd17 (patch) | |
tree | 9179427ac860211c445df663fd2b86267366bfba /sys/kern/vfs_subr.c | |
parent | cb0aba89af15a48e2655e898a503946ac4cb42ae (diff) | |
download | FreeBSD-src-2469c867a164210ce96143517059f21db7f1fd17.zip FreeBSD-src-2469c867a164210ce96143517059f21db7f1fd17.tar.gz |
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.
Reviewed by: Rodney W. Grimes
Submitted by: John Dyson and David Greenman
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 47 |
1 files changed, 38 insertions, 9 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9891fe6..9535b8a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -62,6 +62,8 @@ #include <miscfs/specfs/specdev.h> +void insmntque __P((struct vnode *, struct mount *)); + enum vtype iftovt_tab[16] = { VNON, VFIFO, VCHR, VNON, VDIR, VNON, VBLK, VNON, VREG, VNON, VLNK, VNON, VSOCK, VNON, VNON, VBAD, @@ -86,6 +88,7 @@ struct mntlist mountlist; /* mounted filesystem list */ /* * Initialize the vnode management data structures. */ +void vntblinit() { @@ -97,6 +100,7 @@ vntblinit() * Lock a filesystem. * Used to prevent access to it while mounting and unmounting. */ +int vfs_lock(mp) register struct mount *mp; { @@ -131,6 +135,7 @@ vfs_unlock(mp) * Mark a mount point as busy. * Used to synchronize access and to delay unmounting. */ +int vfs_busy(mp) register struct mount *mp; { @@ -149,6 +154,7 @@ vfs_busy(mp) * Free a busy filesystem. * Panic if filesystem is not busy. */ +void vfs_unbusy(mp) register struct mount *mp; { @@ -209,12 +215,14 @@ static u_short xxxfs_mntid; /* * Set vnode attributes to VNOVAL */ -void vattr_null(vap) +void +vattr_null(vap) register struct vattr *vap; { vap->va_type = VNON; - vap->va_size = vap->va_bytes = VNOVAL; + vap->va_size = VNOVAL; + vap->va_bytes = VNOVAL; vap->va_mode = vap->va_nlink = vap->va_uid = vap->va_gid = vap->va_fsid = vap->va_fileid = vap->va_blocksize = vap->va_rdev = @@ -236,6 +244,7 @@ extern struct vattr va_null; /* * Return the next vnode from the free list. */ +int getnewvnode(tag, mp, vops, vpp) enum vtagtype tag; struct mount *mp; @@ -298,6 +307,7 @@ getnewvnode(tag, mp, vops, vpp) /* * Move a vnode from one mount queue to another. */ +void insmntque(vp, mp) register struct vnode *vp; register struct mount *mp; @@ -319,6 +329,7 @@ insmntque(vp, mp) /* * Update outstanding I/O count and do wakeup if requested. */ +void vwakeup(bp) register struct buf *bp; { @@ -411,6 +422,7 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo) /* * Associate a buffer with a vnode. */ +void bgetvp(vp, bp) register struct vnode *vp; register struct buf *bp; @@ -433,6 +445,7 @@ bgetvp(vp, bp) /* * Disassociate a buffer from a vnode. */ +void brelvp(bp) register struct buf *bp; { @@ -455,6 +468,7 @@ brelvp(bp) * Used to assign file specific control information * (indirect blocks) to the vnode to which they belong. */ +void reassignbuf(bp, newvp) register struct buf *bp; register struct vnode *newvp; @@ -486,6 +500,7 @@ reassignbuf(bp, newvp) * Used for root filesystem, argdev, and swap areas. * Also used for memory file system special devices. */ +int bdevvp(dev, vpp) dev_t dev; struct vnode **vpp; @@ -579,6 +594,7 @@ loop: * indicate that the vnode is no longer usable (possibly having * been changed to a new file system type). */ +int vget(vp, lockflag) register struct vnode *vp; int lockflag; @@ -612,7 +628,8 @@ vget(vp, lockflag) /* * Vnode reference, just increment the count */ -void vref(vp) +void +vref(vp) struct vnode *vp; { @@ -624,7 +641,8 @@ void vref(vp) /* * vput(), just unlock and vrele() */ -void vput(vp) +void +vput(vp) register struct vnode *vp; { @@ -636,7 +654,8 @@ void vput(vp) * Vnode release. * If count drops to zero, call inactive routine and return to freelist. */ -void vrele(vp) +void +vrele(vp) register struct vnode *vp; { @@ -663,7 +682,8 @@ void vrele(vp) /* * Page or buffer structure gets a reference. */ -void vhold(vp) +void +vhold(vp) register struct vnode *vp; { @@ -673,7 +693,8 @@ void vhold(vp) /* * Page or buffer structure frees a reference. */ -void holdrele(vp) +void +holdrele(vp) register struct vnode *vp; { @@ -695,6 +716,7 @@ int busyprt = 0; /* print out busy vnodes */ struct ctldebug debug1 = { "busyprt", &busyprt }; #endif +int vflush(mp, skipvp, flags) struct mount *mp; struct vnode *skipvp; @@ -837,7 +859,8 @@ vclean(vp, flags) * Eliminate all activity associated with the requested vnode * and with all vnodes aliased to the requested vnode. */ -void vgoneall(vp) +void +vgoneall(vp) register struct vnode *vp; { register struct vnode *vq; @@ -880,7 +903,8 @@ void vgoneall(vp) * Eliminate all activity associated with a vnode * in preparation for reuse. */ -void vgone(vp) +void +vgone(vp) register struct vnode *vp; { register struct vnode *vq; @@ -966,6 +990,7 @@ void vgone(vp) /* * Lookup a vnode by device number. */ +int vfinddev(dev, type, vpp) dev_t dev; enum vtype type; @@ -985,6 +1010,7 @@ vfinddev(dev, type, vpp) /* * Calculate the total number of references to a special device. */ +int vcount(vp) register struct vnode *vp; { @@ -1016,6 +1042,7 @@ loop: static char *typename[] = { "VNON", "VREG", "VDIR", "VBLK", "VCHR", "VLNK", "VSOCK", "VFIFO", "VBAD" }; +void vprint(label, vp) char *label; register struct vnode *vp; @@ -1057,6 +1084,7 @@ vprint(label, vp) * List all of the locked vnodes in the system. * Called when debugging the kernel. */ +void printlockedvnodes() { register struct mount *mp; @@ -1081,6 +1109,7 @@ int kinfo_vgetfailed; * Copyout address of vnode followed by vnode. */ /* ARGSUSED */ +int sysctl_vnode(where, sizep) char *where; size_t *sizep; |