diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-03-12 09:41:15 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-03-12 09:41:15 +0000 |
commit | 863809f2ea40195ffef053a8d971d685b99fb03a (patch) | |
tree | 4a6a548e001ea5def4e03e7b39cdc45334807d03 /share | |
parent | 092fedf8e0695cc819935ddc9205603de47bafb5 (diff) |
add VOP_FSYNC, VOP_ISLOCKED, and VOP_REMOVE
only 28 more to go!
ok jmc@
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/Makefile | 6 | ||||
-rw-r--r-- | share/man/man9/VOP_LOOKUP.9 | 46 |
2 files changed, 50 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 2f475c316c6..cd5a74a791f 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.65 2003/03/11 20:28:33 tedu Exp $ +# $OpenBSD: Makefile,v 1.66 2003/03/12 09:41:14 tedu Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -186,8 +186,10 @@ MLINKS+=kern.9 imax.9 kern.9 imin.9 kern.9 lmax.9 kern.9 lmin.9 \ kern.9 random.9 kern.9 srandom.9 kern.9 getsn.9 # VOP functions -MLINKS+=VOP_LOOKUP.9 VOP_GETEXTATTR.9 VOP_LOOKUP.9 VOP_LOCK.9 \ +MLINKS+=VOP_LOOKUP.9 VOP_FSYNC.9 VOP_LOOKUP.9 VOP_ISLOCKED.9 \ + VOP_LOOKUP.9 VOP_GETEXTATTR.9 VOP_LOOKUP.9 VOP_LOCK.9 \ VOP_LOOKUP.9 VOP_MKDIR.9 VOP_LOOKUP.9 VOP_RMDIR.9 \ + VOP_LOOKUP.9 VOP_REMOVE.9 \ VOP_LOOKUP.9 VOP_RECLAIM.9 VOP_LOOKUP.9 VOP_REVOKE.9 \ VOP_LOOKUP.9 VOP_SETEXTATTR.9 VOP_LOOKUP.9 VOP_UNLOCK.9 diff --git a/share/man/man9/VOP_LOOKUP.9 b/share/man/man9/VOP_LOOKUP.9 index 2c23046d1f6..09db1018ed0 100644 --- a/share/man/man9/VOP_LOOKUP.9 +++ b/share/man/man9/VOP_LOOKUP.9 @@ -31,6 +31,13 @@ .Sh SYNOPSIS .Fd #include <sys/vnode.h> .Ft int +.Fo VOP_FSYNC +.Fa "struct vnode *vp" +.Fa "struct ucred *cred" +.Fa "int waitfor" +.Fa "struct proc *p" +.Fc +.Ft int .Fo VOP_GETEXTATTR .Fa "struct vnode *vp" .Fa "int attrnamespace" @@ -41,6 +48,10 @@ .Fa "struct proc *p" .Fc .Ft int +.Fo VOP_ISLOCKED +.Fa "struct vnode *" +.Fc +.Ft int .Fo VOP_LOCK .Fa "struct vnode *vp" .Fa "int flags" @@ -65,6 +76,12 @@ .Fa "struct proc *p" .Fc .Ft int +.Fo VOP_REMOVE +.Fa "struct vnode *dvp" +.Fa "struct vnode *vp" +.Fa "struct componentname *cnp" +.Fc +.Ft int .Fo VOP_REVOKE .Fa "struct vnode *vp" .Fa "int flags" @@ -114,6 +131,15 @@ functions is described in the file Most VOP calls take a struct proc *p argument. This should be the current process. VOP calls are not safe to call in an interrupt context. +.Sh VOP_FSYNC +.Nm VOP_FSYNC +flushes any dirty buffers associated with +.Ar vp +to disk. +The vnode is locked on entry and exit. +.Ar waitfor +can be set to MNT_WAIT to indicate VOP_FSYNC should not return +until all data is written. .Sh VOP_GETEXTATTR .Nm VOP_GETEXTATTR and @@ -178,6 +204,18 @@ and perform any other cleanup activity related to .Ar vp is unlocked on entry and exit. VOP_RECLAIM should not be used by generic code. +.Sh VOP_REMOVE +.Nm VOP_REMOVE +removes the link named +.Ar cnp +from the directory +.Ar dvp . +This file corresponds to the vnode +.Ar vp . +Both dvp and vp are locked on entry and unlocked on exit, and +each has its reference count decremented by one. +VOP_REMOVE does not delete the file from disk unless its link count +becomes zero (for file systems which support multiple links). .Sh VOP_REVOKE .Nm VOP_REVOKE is used by the @@ -207,6 +245,12 @@ It should not be used by other file system code. unlocks a vnode. .Ar flags should be zero in most cases. +.Nm VOP_ISLOCKED +returns 1 if +.Ar vp +is locked and 0 if not. +It should be used cautiously, as not all file systems implement locks +effectively. Note the asymmetry between vn_lock and VOP_UNLOCK. .Sh RETURN VALUES The @@ -228,6 +272,8 @@ stub call .Xr errno 2 , .Xr vn_lock 9 , .Xr vnode 9 +.Sh AUTHORS +This man page was written by Ted Unangst for OpenBSD. .Sh BUGS The locking discipline is too complex. Refer to .Xr vn_lock 9 . |