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 # 4. Neither the name of the University nor the names of its contributors
14 # may be used to endorse or promote products derived from this software
15 # without specific prior written permission.
17 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 # @(#)vnode_if.src 8.12 (Berkeley) 5/14/95
34 # Above each of the vop descriptors is a specification of the locking
35 # protocol used by each vop call. The first column is the name of
36 # the variable, the remaining three columns are in, out and error
37 # respectively. The "in" column defines the lock state on input,
38 # the "out" column defines the state on succesful return, and the
39 # "error" column defines the locking state on error exit.
41 # The locking value can take the following values:
42 # L: locked; not converted to type of lock.
44 # S: locked with shared lock.
45 # E: locked with exclusive lock for this process.
46 # O: locked with exclusive lock for other process.
48 # -: not applicable. vnode does not yet (or no longer) exists.
49 # =: the same on input and output, may be either L or U.
50 # X: locked if not nil.
52 # The paramater named "vpp" is assumed to be always used with double
53 # indirection (**vpp) and that name is hard-codeed in vnode_if.awk !
55 # If other such parameters are introduced, they have to be added to
56 # the AWK script at the head of the definition of "add_debug_code()".
70 #! lookup pre vop_lookup_pre
71 #! lookup post vop_lookup_post
73 # XXX - the lookup locking protocol defies simple description and depends
74 # on the flags and operation fields in the (cnp) structure. Note
75 # especially that *vpp may equal dvp and both may be locked.
79 INOUT struct vnode **vpp;
80 IN struct componentname *cnp;
84 #% cachedlookup dvp L ? ?
85 #% cachedlookup vpp - L -
87 # This must be an exact copy of lookup. See kern/vfs_cache.c for details.
91 INOUT struct vnode **vpp;
92 IN struct componentname *cnp;
100 IN struct vnode *dvp;
101 OUT struct vnode **vpp;
102 IN struct componentname *cnp;
103 IN struct vattr *vap;
107 #% whiteout dvp L L L
110 IN struct vnode *dvp;
111 IN struct componentname *cnp;
120 IN struct vnode *dvp;
121 OUT struct vnode **vpp;
122 IN struct componentname *cnp;
123 IN struct vattr *vap;
132 IN struct ucred *cred;
133 IN struct thread *td;
143 IN struct ucred *cred;
144 IN struct thread *td;
153 IN struct ucred *cred;
154 IN struct thread *td;
162 OUT struct vattr *vap;
163 IN struct ucred *cred;
164 IN struct thread *td;
172 IN struct vattr *vap;
173 IN struct ucred *cred;
174 IN struct thread *td;
182 INOUT struct uio *uio;
184 IN struct ucred *cred;
192 INOUT struct uio *uio;
194 IN struct ucred *cred;
202 IN struct thread *td;
203 IN struct ucred *cred;
215 IN struct ucred *cred;
216 IN struct thread *td;
225 IN struct ucred *cred;
226 IN struct thread *td;
251 IN struct thread *td;
259 IN struct vnode *dvp;
261 IN struct componentname *cnp;
269 IN struct vnode *tdvp;
271 IN struct componentname *cnp;
279 #! rename pre vop_rename_pre
282 IN WILLRELE struct vnode *fdvp;
283 IN WILLRELE struct vnode *fvp;
284 IN struct componentname *fcnp;
285 IN WILLRELE struct vnode *tdvp;
286 IN WILLRELE struct vnode *tvp;
287 IN struct componentname *tcnp;
295 IN struct vnode *dvp;
296 OUT struct vnode **vpp;
297 IN struct componentname *cnp;
298 IN struct vattr *vap;
306 IN struct vnode *dvp;
308 IN struct componentname *cnp;
316 IN struct vnode *dvp;
317 OUT struct vnode **vpp;
318 IN struct componentname *cnp;
319 IN struct vattr *vap;
328 INOUT struct uio *uio;
329 IN struct ucred *cred;
332 INOUT u_long **cookies;
340 INOUT struct uio *uio;
341 IN struct ucred *cred;
349 IN struct thread *td;
357 IN struct thread *td;
362 #! lock pre vop_lock_pre
363 #! lock post vop_lock_post
368 IN struct thread *td;
373 #! unlock pre vop_unlock_pre
374 #! unlock post vop_unlock_post
379 IN struct thread *td;
388 OUT struct bufobj **bop;
396 #! strategy pre vop_strategy_pre
404 #% getwritemount vp = = =
408 OUT struct mount **mpp;
424 OUT register_t *retval;
439 #% reallocblks vp L L L
443 IN struct cluster_save *buflist;
454 IN vm_ooffset_t offset;
466 IN vm_ooffset_t offset;
475 OUT struct acl *aclp;
476 IN struct ucred *cred;
477 IN struct thread *td;
487 IN struct ucred *cred;
488 IN struct thread *td;
498 IN struct ucred *cred;
499 IN struct thread *td;
503 #% closeextattr vp L L L
508 IN struct ucred *cred;
509 IN struct thread *td;
513 #% getextattr vp L L L
517 IN int attrnamespace;
519 INOUT struct uio *uio;
521 IN struct ucred *cred;
522 IN struct thread *td;
526 #% listextattr vp L L L
530 IN int attrnamespace;
531 INOUT struct uio *uio;
533 IN struct ucred *cred;
534 IN struct thread *td;
538 #% openextattr vp L L L
542 IN struct ucred *cred;
543 IN struct thread *td;
547 #% deleteextattr vp L L L
551 IN int attrnamespace;
553 IN struct ucred *cred;
554 IN struct thread *td;
558 #% setextattr vp L L L
562 IN int attrnamespace;
564 INOUT struct uio *uio;
565 IN struct ucred *cred;
566 IN struct thread *td;
574 IN struct label *label;
575 IN struct ucred *cred;
576 IN struct thread *td;