summaryrefslogtreecommitdiffstats
path: root/sys/kern/vnode_if.src
diff options
context:
space:
mode:
authorcsapuntz <csapuntz@openbsd.org>1997-10-06 15:05:18 +0000
committercsapuntz <csapuntz@openbsd.org>1997-10-06 15:05:18 +0000
commit6e175d504b4d2c3634337aa6a71d85b74b81c113 (patch)
tree69347f4cbda33eca8b28929f0e401694bb32f5f7 /sys/kern/vnode_if.src
parentVFS Lite 2 Changes (diff)
downloadwireguard-openbsd-6e175d504b4d2c3634337aa6a71d85b74b81c113.tar.xz
wireguard-openbsd-6e175d504b4d2c3634337aa6a71d85b74b81c113.zip
VFS Lite2 Changes
Diffstat (limited to 'sys/kern/vnode_if.src')
-rw-r--r--sys/kern/vnode_if.src241
1 files changed, 230 insertions, 11 deletions
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index 0a8c45ace58..76edff456c6 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -1,4 +1,4 @@
-# $OpenBSD: vnode_if.src,v 1.4 1996/05/22 11:47:12 deraadt Exp $
+# $OpenBSD: vnode_if.src,v 1.5 1997/10/06 15:12:48 csapuntz Exp $
# $NetBSD: vnode_if.src,v 1.10 1996/05/11 18:26:27 mycroft Exp $
#
# Copyright (c) 1992, 1993
@@ -34,12 +34,43 @@
#
# @(#)vnode_if.src 8.3 (Berkeley) 2/3/94
#
+
+
+#
+# Above each of the vop descriptors is a specification of the locking
+# protocol used by each vop call. The first column is the name of
+# the variable, the remaining three columns are in, out and error
+# respectively. The "in" column defines the lock state on input,
+# the "out" column defines the state on succesful return, and the
+# "error" column defines the locking state on error exit.
+#
+# The locking value can take the following values:
+# L: locked.
+# U: unlocked/
+# -: not applicable. vnode does not yet (or no longer) exists.
+# =: the same on input and output, may be either L or U.
+# X: locked if not nil.
+#
+
+#
+#% lookup dvp L ? ?
+#% lookup vpp - L -
+#
+# XXX - the lookup locking protocol defies simple description and depends
+# on the flags and operation fields in the (cnp) structure. Note
+# especially that *vpp may equal dvp and both may be locked.
+
vop_lookup {
IN struct vnode *dvp;
INOUT struct vnode **vpp;
IN struct componentname *cnp;
};
+#
+#% create dvp L U U
+#% create vpp - L -
+#
+
vop_create {
IN WILLRELE struct vnode *dvp;
OUT struct vnode **vpp;
@@ -47,6 +78,11 @@ vop_create {
IN struct vattr *vap;
};
+#
+#% mknod dvp L U U
+#% mknod vpp - X -
+#
+
vop_mknod {
IN WILLRELE struct vnode *dvp;
OUT WILLRELE struct vnode **vpp;
@@ -54,6 +90,10 @@ vop_mknod {
IN struct vattr *vap;
};
+#
+#% open vp L L L
+#
+
vop_open {
IN struct vnode *vp;
IN int mode;
@@ -61,6 +101,10 @@ vop_open {
IN struct proc *p;
};
+#
+#% close vp U U U
+#
+
vop_close {
IN struct vnode *vp;
IN int fflag;
@@ -68,6 +112,10 @@ vop_close {
IN struct proc *p;
};
+#
+#% access vp L L L
+#
+
vop_access {
IN struct vnode *vp;
IN int mode;
@@ -75,6 +123,10 @@ vop_access {
IN struct proc *p;
};
+#
+#% getattr vp = = =
+#
+
vop_getattr {
IN struct vnode *vp;
IN struct vattr *vap;
@@ -82,6 +134,11 @@ vop_getattr {
IN struct proc *p;
};
+
+#
+#% setattr vp L L L
+#
+
vop_setattr {
IN struct vnode *vp;
IN struct vattr *vap;
@@ -89,6 +146,10 @@ vop_setattr {
IN struct proc *p;
};
+#
+#% read vp L L L
+#
+
vop_read {
IN struct vnode *vp;
INOUT struct uio *uio;
@@ -96,6 +157,10 @@ vop_read {
IN struct ucred *cred;
};
+#
+#% write vp L L L
+#
+
vop_write {
IN struct vnode *vp;
INOUT struct uio *uio;
@@ -103,6 +168,20 @@ vop_write {
IN struct ucred *cred;
};
+#
+#% lease vp = = =
+#
+vop_lease {
+ IN struct vnode *vp;
+ IN struct proc *p;
+ IN struct ucred *cred;
+ IN int flag;
+};
+
+#
+#% ioctl vp U U U
+#
+
vop_ioctl {
IN struct vnode *vp;
IN u_long command;
@@ -112,7 +191,11 @@ vop_ioctl {
IN struct proc *p;
};
+#
+#% select vp U U U
+#
# Needs work? (fflags)
+#
vop_select {
IN struct vnode *vp;
IN int which;
@@ -121,6 +204,17 @@ vop_select {
IN struct proc *p;
};
+#
+#% revoke vp U U U
+#
+vop_revoke {
+ IN struct vnode *vp;
+ IN int flags;
+};
+
+#
+# XXX - not used
+#
vop_mmap {
IN struct vnode *vp;
IN int fflags;
@@ -128,6 +222,9 @@ vop_mmap {
IN struct proc *p;
};
+#
+#% fsync vp L L L
+#
vop_fsync {
IN struct vnode *vp;
IN struct ucred *cred;
@@ -135,7 +232,10 @@ vop_fsync {
IN struct proc *p;
};
-# Needs word: Is newoff right? What's it mean?
+#
+# XXX - not used
+# Needs work: Is newoff right? What's it mean?
+#
vop_seek {
IN struct vnode *vp;
IN off_t oldoff;
@@ -143,18 +243,34 @@ vop_seek {
IN struct ucred *cred;
};
+#
+#% remove dvp L U U
+#% remove vp L U U
+#
+
vop_remove {
IN WILLRELE struct vnode *dvp;
IN WILLRELE struct vnode *vp;
IN struct componentname *cnp;
};
+#
+#% link vp U U U
+#% link tdvp L U U
+#
vop_link {
IN WILLRELE struct vnode *dvp;
IN struct vnode *vp;
IN struct componentname *cnp;
};
+#
+#% rename fdvp U U U
+#% rename fvp U U U
+#% rename tdvp L U U
+#% rename tvp X U U
+#
+
vop_rename {
IN WILLRELE struct vnode *fdvp;
IN WILLRELE struct vnode *fvp;
@@ -164,6 +280,11 @@ vop_rename {
IN struct componentname *tcnp;
};
+#
+#% mkdir dvp L U U
+#% mkdir vpp - L -
+#
+
vop_mkdir {
IN WILLRELE struct vnode *dvp;
OUT struct vnode **vpp;
@@ -171,12 +292,26 @@ vop_mkdir {
IN struct vattr *vap;
};
+#
+#% rmdir dvp L U U
+#% rmdir vp L U U
+#
+
vop_rmdir {
IN WILLRELE struct vnode *dvp;
IN WILLRELE struct vnode *vp;
IN struct componentname *cnp;
};
+#
+#% symlink dvp L U U
+#% symlink vpp - U -
+#
+# XXX - note that the return vnode has already been VRELE'ed
+# by the filesystem layer. To use it you must use vget,
+# possibly with a further namei.
+#
+
vop_symlink {
IN WILLRELE struct vnode *dvp;
OUT WILLRELE struct vnode **vpp;
@@ -185,42 +320,79 @@ vop_symlink {
IN char *target;
};
+#
+#% readdir vp L L L
+#
+
vop_readdir {
IN struct vnode *vp;
INOUT struct uio *uio;
IN struct ucred *cred;
- OUT int *eofflag;
- OUT u_long *cookies;
- IN int ncookies;
+ INOUT int *eofflag;
+ OUT int *ncookies;
+ INOUT u_long **cookies;
};
+#
+#% readlink vp L L L
+#
vop_readlink {
IN struct vnode *vp;
INOUT struct uio *uio;
IN struct ucred *cred;
};
+#
+#% abortop dvp = = =
+#
vop_abortop {
IN struct vnode *dvp;
IN struct componentname *cnp;
};
+
+#
+#% inactive vp L U U
+#
vop_inactive {
IN struct vnode *vp;
+ IN struct proc *p;
};
+#
+#% reclaim vp U U U
+#
+
vop_reclaim {
IN struct vnode *vp;
+ IN struct proc *p;
};
+#
+#% lock vp U L U
+#
+
vop_lock {
IN struct vnode *vp;
+ IN int flags;
+ IN struct proc *p;
};
+#
+#% unlock vp L U L
+#
+
vop_unlock {
IN struct vnode *vp;
+ IN int flags;
+ IN struct proc *p;
};
+#
+#% bmap vp L L L
+#% bmap vpp - U -
+#
+
vop_bmap {
IN struct vnode *vp;
IN daddr_t bn;
@@ -229,24 +401,39 @@ vop_bmap {
OUT int *runp;
};
+#
+# Needs work: no vp?
+#
#vop_strategy {
# IN struct buf *bp;
#};
+#
+#% print vp = = =
+#
vop_print {
IN struct vnode *vp;
};
+#
+#% islocked vp = = =
+#
vop_islocked {
IN struct vnode *vp;
};
+#
+#% pathconf vp L L L
+#
vop_pathconf {
IN struct vnode *vp;
IN int name;
OUT register_t *retval;
};
+#
+#% advlock vp U U U
+#
vop_advlock {
IN struct vnode *vp;
IN caddr_t id;
@@ -255,6 +442,9 @@ vop_advlock {
IN int flags;
};
+#
+#% blkatoff vp L L L
+#
vop_blkatoff {
IN struct vnode *vp;
IN off_t offset;
@@ -262,6 +452,9 @@ vop_blkatoff {
OUT struct buf **bpp;
};
+#
+#% valloc pvp L L L
+#
vop_valloc {
IN struct vnode *pvp;
IN int mode;
@@ -269,17 +462,40 @@ vop_valloc {
OUT struct vnode **vpp;
};
+#
+#% balloc vp L L L
+#
+vop_balloc {
+ IN struct vnode *vp;
+ IN off_t startoffset;
+ IN int size;
+ IN struct ucred *cred;
+ IN int flags;
+ OUT struct buf **bpp;
+};
+
+#
+#% reallocblks vp L L L
+#
vop_reallocblks {
IN struct vnode *vp;
IN struct cluster_save *buflist;
};
+#
+#% vfree pvp L L L
+#
+
vop_vfree {
IN struct vnode *pvp;
IN ino_t ino;
IN int mode;
};
+#
+#% truncate vp L L L
+#
+
vop_truncate {
IN struct vnode *vp;
IN off_t length;
@@ -288,6 +504,10 @@ vop_truncate {
IN struct proc *p;
};
+#
+#% update vp L L L
+#
+
vop_update {
IN struct vnode *vp;
IN struct timespec *access;
@@ -295,12 +515,11 @@ vop_update {
IN int waitfor;
};
-vop_lease {
- IN struct vnode *vp;
- IN struct proc *p;
- IN struct ucred *cred;
- IN int flag;
-};
+#
+#% whiteout dvp L L L
+#% whiteout cnp - - -
+#% whiteout flag - - -
+#
vop_whiteout {
IN struct vnode *dvp;