2 # Copyright (c) 1992, 1993
3 # The Regents of the University of California. All rights reserved.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
8 # 1. Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # 2. Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the distribution.
13 # 3. All advertising materials mentioning features or use of this software
14 # must display the following acknowledgement:
15 # This product includes software developed by the University of
16 # California, Berkeley and its contributors.
17 # 4. Neither the name of the University nor the names of its contributors
18 # may be used to endorse or promote products derived from this software
19 # without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 # @(#)vnode_if.src 8.12 (Berkeley) 5/14/95
34 # $FreeBSD: src/sys/kern/vnode_if.src,v 1.29.2.3 2001/05/18 09:58:45 bp Exp $
35 # $DragonFly: src/sys/kern/Attic/vnode_if.src,v 1.6 2004/03/01 06:33:17 dillon Exp $
39 # Above each of the vop descriptors is a specification of the locking
40 # protocol used by each vop call. The first column is the name of
41 # the variable, the remaining three columns are in, out and error
42 # respectively. The "in" column defines the lock state on input,
43 # the "out" column defines the state on succesful return, and the
44 # "error" column defines the locking state on error exit.
46 # The locking value can take the following values:
47 # L: locked; not converted to type of lock.
49 # S: locked with shared lock.
50 # E: locked with exclusive lock for this process.
51 # O: locked with exclusive lock for other process.
53 # -: not applicable. vnode does not yet (or no longer) exists.
54 # =: the same on input and output, may be either L or U.
55 # X: locked if not nil.
70 # XXX - the lookup locking protocol defies simple description and depends
71 # on the flags and operation fields in the (cnp) structure. Note
72 # especially that *vpp may equal dvp and both may be locked.
76 IN struct namecache *par;
77 INOUT struct vnode **vpp;
78 INOUT struct namecache **ncpp;
79 IN struct componentname *cnp;
83 #% cachedlookup dvp L ? ?
84 #% cachedlookup vpp - L -
86 # This must be an exact copy of lookup. See kern/vfs_cache.c for details.
90 IN struct namecache *par;
91 INOUT struct vnode **vpp;
92 INOUT struct namecache **ncpp;
93 IN struct componentname *cnp;
101 IN struct vnode *dvp;
102 IN struct namecache *par;
103 OUT struct vnode **vpp;
104 IN struct componentname *cnp;
105 IN struct vattr *vap;
109 #% whiteout dvp L L L
112 IN struct vnode *dvp;
113 IN struct namecache *par;
114 IN struct componentname *cnp;
123 IN struct vnode *dvp;
124 IN struct namecache *par;
125 OUT struct vnode **vpp;
126 IN struct componentname *cnp;
127 IN struct vattr *vap;
136 IN struct ucred *cred;
137 IN struct thread *td;
146 IN struct thread *td;
155 IN struct ucred *cred;
156 IN struct thread *td;
164 OUT struct vattr *vap;
165 IN struct thread *td;
173 IN struct vattr *vap;
174 IN struct ucred *cred;
175 IN struct thread *td;
183 INOUT struct uio *uio;
185 IN struct ucred *cred;
193 INOUT struct uio *uio;
195 IN struct ucred *cred;
203 IN struct thread *td;
204 IN struct ucred *cred;
216 IN struct ucred *cred;
217 IN struct thread *td;
226 IN struct ucred *cred;
227 IN struct thread *td;
252 IN struct ucred *cred;
253 IN struct thread *td;
262 IN struct thread *td;
270 IN struct vnode *dvp;
271 IN struct namecache *par;
273 IN struct componentname *cnp;
281 IN struct vnode *tdvp;
282 IN struct namecache *par;
284 IN struct componentname *cnp;
294 IN WILLRELE struct vnode *fdvp;
295 IN struct namecache *fpar;
296 IN WILLRELE struct vnode *fvp;
297 IN struct componentname *fcnp;
298 IN WILLRELE struct vnode *tdvp;
299 IN struct namecache *tpar;
300 IN WILLRELE struct vnode *tvp;
301 IN struct componentname *tcnp;
309 IN struct vnode *dvp;
310 IN struct namecache *par;
311 OUT struct vnode **vpp;
312 IN struct componentname *cnp;
313 IN struct vattr *vap;
321 IN struct vnode *dvp;
322 IN struct namecache *par;
324 IN struct componentname *cnp;
332 IN struct vnode *dvp;
333 IN struct namecache *par;
334 OUT struct vnode **vpp;
335 IN struct componentname *cnp;
336 IN struct vattr *vap;
345 INOUT struct uio *uio;
346 IN struct ucred *cred;
349 INOUT u_long **cookies;
357 INOUT struct uio *uio;
358 IN struct ucred *cred;
366 IN struct thread *td;
374 IN struct thread *td;
382 IN struct lwkt_tokref *vlock;
384 IN struct thread *td;
392 IN struct lwkt_tokref *vlock;
394 IN struct thread *td;
404 OUT struct vnode **vpp;
431 OUT register_t *retval;
450 IN off_t startoffset;
452 IN struct ucred *cred;
454 OUT struct buf **bpp;
458 #% reallocblks vp L L L
462 IN struct cluster_save *buflist;
473 IN vm_ooffset_t offset;
485 IN vm_ooffset_t offset;
491 # This call is used by the filesystem to release blocks back to
492 # device-driver. This is useful if the driver has a lengthy
493 # erase handling or similar.
516 OUT struct acl *aclp;
517 IN struct ucred *cred;
518 IN struct thread *td;
528 IN struct ucred *cred;
529 IN struct thread *td;
539 IN struct ucred *cred;
540 IN struct thread *td;
544 #% getextattr vp L L L
549 INOUT struct uio *uio;
550 IN struct ucred *cred;
551 IN struct thread *td;
555 #% setextattr vp L L L
560 INOUT struct uio *uio;
561 IN struct ucred *cred;
562 IN struct thread *td;
566 #% createvobject vp L L L
570 IN struct thread *td;
574 #% destroyvobject vp L L L
581 #% getvobject vp L L L
585 OUT struct vm_object **objpp;