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;
98 #! create post vop_create_post
101 IN struct vnode *dvp;
102 OUT struct vnode **vpp;
103 IN struct componentname *cnp;
104 IN struct vattr *vap;
108 #% whiteout dvp E E E
111 IN struct vnode *dvp;
112 IN struct componentname *cnp;
119 #! mknod post vop_mknod_post
122 IN struct vnode *dvp;
123 OUT struct vnode **vpp;
124 IN struct componentname *cnp;
125 IN struct vattr *vap;
134 IN struct ucred *cred;
135 IN struct thread *td;
145 IN struct ucred *cred;
146 IN struct thread *td;
155 IN struct ucred *cred;
156 IN struct thread *td;
164 OUT struct vattr *vap;
165 IN struct ucred *cred;
166 IN struct thread *td;
171 #! setattr post vop_setattr_post
175 IN struct vattr *vap;
176 IN struct ucred *cred;
177 IN struct thread *td;
185 INOUT struct uio *uio;
187 IN struct ucred *cred;
192 #! write pre VOP_WRITE_PRE
193 #! write post VOP_WRITE_POST
197 INOUT struct uio *uio;
199 IN struct ucred *cred;
207 IN struct thread *td;
208 IN struct ucred *cred;
220 IN struct ucred *cred;
221 IN struct thread *td;
230 IN struct ucred *cred;
231 IN struct thread *td;
256 IN struct thread *td;
262 #! remove post vop_remove_post
265 IN struct vnode *dvp;
267 IN struct componentname *cnp;
273 #! link post vop_link_post
276 IN struct vnode *tdvp;
278 IN struct componentname *cnp;
286 #! rename pre vop_rename_pre
287 #! rename post vop_rename_post
290 IN WILLRELE struct vnode *fdvp;
291 IN WILLRELE struct vnode *fvp;
292 IN struct componentname *fcnp;
293 IN WILLRELE struct vnode *tdvp;
294 IN WILLRELE struct vnode *tvp;
295 IN struct componentname *tcnp;
301 #! mkdir post vop_mkdir_post
304 IN struct vnode *dvp;
305 OUT struct vnode **vpp;
306 IN struct componentname *cnp;
307 IN struct vattr *vap;
313 #! rmdir post vop_rmdir_post
316 IN struct vnode *dvp;
318 IN struct componentname *cnp;
324 #! symlink post vop_symlink_post
327 IN struct vnode *dvp;
328 OUT struct vnode **vpp;
329 IN struct componentname *cnp;
330 IN struct vattr *vap;
339 INOUT struct uio *uio;
340 IN struct ucred *cred;
343 INOUT u_long **cookies;
351 INOUT struct uio *uio;
352 IN struct ucred *cred;
360 IN struct thread *td;
368 IN struct thread *td;
373 #! lock pre vop_lock_pre
374 #! lock post vop_lock_post
379 IN struct thread *td;
384 #! unlock pre vop_unlock_pre
385 #! unlock post vop_unlock_post
390 IN struct thread *td;
399 OUT struct bufobj **bop;
407 #! strategy pre vop_strategy_pre
415 #% getwritemount vp = = =
419 OUT struct mount **mpp;
435 OUT register_t *retval;
450 #% reallocblks vp E E E
454 IN struct cluster_save *buflist;
465 IN vm_ooffset_t offset;
477 IN vm_ooffset_t offset;
486 OUT struct acl *aclp;
487 IN struct ucred *cred;
488 IN struct thread *td;
498 IN struct ucred *cred;
499 IN struct thread *td;
509 IN struct ucred *cred;
510 IN struct thread *td;
514 #% closeextattr vp L L L
519 IN struct ucred *cred;
520 IN struct thread *td;
524 #% getextattr vp L L L
528 IN int attrnamespace;
530 INOUT struct uio *uio;
532 IN struct ucred *cred;
533 IN struct thread *td;
537 #% listextattr vp L L L
541 IN int attrnamespace;
542 INOUT struct uio *uio;
544 IN struct ucred *cred;
545 IN struct thread *td;
549 #% openextattr vp L L L
553 IN struct ucred *cred;
554 IN struct thread *td;
558 #% deleteextattr vp E E E
562 IN int attrnamespace;
564 IN struct ucred *cred;
565 IN struct thread *td;
569 #% setextattr vp E E E
573 IN int attrnamespace;
575 INOUT struct uio *uio;
576 IN struct ucred *cred;
577 IN struct thread *td;
585 IN struct label *label;
586 IN struct ucred *cred;
587 IN struct thread *td;