FreeBSD/Linux Kernel Cross Reference
sys/kern/vnode_if.src
1 #
2 # Copyright (c) 1992, 1993
3 # The Regents of the University of California. All rights reserved.
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
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.
20 #
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
31 # SUCH DAMAGE.
32 #
33 # @(#)vnode_if.src 8.12 (Berkeley) 5/14/95
34 # $FreeBSD: releng/5.0/sys/kern/vnode_if.src 103980 2002-09-26 00:31:16Z jeff $
35 #
36
37 #
38 # Above each of the vop descriptors is a specification of the locking
39 # protocol used by each vop call. The first column is the name of
40 # the variable, the remaining three columns are in, out and error
41 # respectively. The "in" column defines the lock state on input,
42 # the "out" column defines the state on succesful return, and the
43 # "error" column defines the locking state on error exit.
44 #
45 # The locking value can take the following values:
46 # L: locked; not converted to type of lock.
47 # A: any lock type.
48 # S: locked with shared lock.
49 # E: locked with exclusive lock for this process.
50 # O: locked with exclusive lock for other process.
51 # U: unlocked.
52 # -: not applicable. vnode does not yet (or no longer) exists.
53 # =: the same on input and output, may be either L or U.
54 # X: locked if not nil.
55 #
56
57 #
58 # islocked vp = = =
59 #
60 vop_islocked {
61 IN struct vnode *vp;
62 IN struct thread *td;
63 };
64
65 #
66 # lookup dvp L ? ?
67 # lookup vpp - L -
68 #! lookup pre vop_lookup_pre
69 #! lookup post vop_lookup_post
70 #
71 # XXX - the lookup locking protocol defies simple description and depends
72 # on the flags and operation fields in the (cnp) structure. Note
73 # especially that *vpp may equal dvp and both may be locked.
74 #
75 vop_lookup {
76 IN struct vnode *dvp;
77 INOUT struct vnode **vpp;
78 IN struct componentname *cnp;
79 };
80
81 #
82 #% cachedlookup dvp L ? ?
83 #% cachedlookup vpp - L -
84 #
85 # This must be an exact copy of lookup. See kern/vfs_cache.c for details.
86 #
87 vop_cachedlookup {
88 IN struct vnode *dvp;
89 INOUT struct vnode **vpp;
90 IN struct componentname *cnp;
91 };
92
93 #
94 #% create dvp L L L
95 #% create vpp - L -
96 #
97 vop_create {
98 IN struct vnode *dvp;
99 OUT struct vnode **vpp;
100 IN struct componentname *cnp;
101 IN struct vattr *vap;
102 };
103
104 #
105 #% whiteout dvp L L L
106 #
107 vop_whiteout {
108 IN struct vnode *dvp;
109 IN struct componentname *cnp;
110 IN int flags;
111 };
112
113 #
114 #% mknod dvp L L L
115 #% mknod vpp - L -
116 #
117 vop_mknod {
118 IN struct vnode *dvp;
119 OUT struct vnode **vpp;
120 IN struct componentname *cnp;
121 IN struct vattr *vap;
122 };
123
124 #
125 #% open vp L L L
126 #
127 vop_open {
128 IN struct vnode *vp;
129 IN int mode;
130 IN struct ucred *cred;
131 IN struct thread *td;
132 };
133
134 #
135 #% close vp U U U
136 #
137 vop_close {
138 IN struct vnode *vp;
139 IN int fflag;
140 IN struct ucred *cred;
141 IN struct thread *td;
142 };
143
144 #
145 #% access vp L L L
146 #
147 vop_access {
148 IN struct vnode *vp;
149 IN int mode;
150 IN struct ucred *cred;
151 IN struct thread *td;
152 };
153
154 #
155 #% getattr vp L L L
156 #
157 vop_getattr {
158 IN struct vnode *vp;
159 OUT struct vattr *vap;
160 IN struct ucred *cred;
161 IN struct thread *td;
162 };
163
164 #
165 #% setattr vp L L L
166 #
167 vop_setattr {
168 IN struct vnode *vp;
169 IN struct vattr *vap;
170 IN struct ucred *cred;
171 IN struct thread *td;
172 };
173
174 #
175 #% read vp L L L
176 #
177 vop_read {
178 IN struct vnode *vp;
179 INOUT struct uio *uio;
180 IN int ioflag;
181 IN struct ucred *cred;
182 };
183
184 #
185 #% write vp L L L
186 #
187 vop_write {
188 IN struct vnode *vp;
189 INOUT struct uio *uio;
190 IN int ioflag;
191 IN struct ucred *cred;
192 };
193
194 #
195 #% lease vp = = =
196 #
197 vop_lease {
198 IN struct vnode *vp;
199 IN struct thread *td;
200 IN struct ucred *cred;
201 IN int flag;
202 };
203
204 #
205 #% ioctl vp U U U
206 #
207 vop_ioctl {
208 IN struct vnode *vp;
209 IN u_long command;
210 IN caddr_t data;
211 IN int fflag;
212 IN struct ucred *cred;
213 IN struct thread *td;
214 };
215
216 #
217 #% poll vp U U U
218 #
219 vop_poll {
220 IN struct vnode *vp;
221 IN int events;
222 IN struct ucred *cred;
223 IN struct thread *td;
224 };
225
226 #
227 #% kqfilter vp U U U
228 #
229 vop_kqfilter {
230 IN struct vnode *vp;
231 IN struct knote *kn;
232 };
233
234 #
235 #% revoke vp U U U
236 #
237 vop_revoke {
238 IN struct vnode *vp;
239 IN int flags;
240 };
241
242 #
243 #% fsync vp L L L
244 #
245 vop_fsync {
246 IN struct vnode *vp;
247 IN struct ucred *cred;
248 IN int waitfor;
249 IN struct thread *td;
250 };
251
252 #
253 #% remove dvp L L L
254 #% remove vp L L L
255 #
256 vop_remove {
257 IN struct vnode *dvp;
258 IN struct vnode *vp;
259 IN struct componentname *cnp;
260 };
261
262 #
263 #% link tdvp L L L
264 #% link vp L L L
265 #
266 vop_link {
267 IN struct vnode *tdvp;
268 IN struct vnode *vp;
269 IN struct componentname *cnp;
270 };
271
272 #
273 # rename fdvp U U U
274 # rename fvp U U U
275 # rename tdvp L U U
276 # rename tvp X U U
277 #! rename pre vop_rename_pre
278 #
279 vop_rename {
280 IN WILLRELE struct vnode *fdvp;
281 IN WILLRELE struct vnode *fvp;
282 IN struct componentname *fcnp;
283 IN WILLRELE struct vnode *tdvp;
284 IN WILLRELE struct vnode *tvp;
285 IN struct componentname *tcnp;
286 };
287
288 #
289 #% mkdir dvp L L L
290 #% mkdir vpp - L -
291 #
292 vop_mkdir {
293 IN struct vnode *dvp;
294 OUT struct vnode **vpp;
295 IN struct componentname *cnp;
296 IN struct vattr *vap;
297 };
298
299 #
300 #% rmdir dvp L L L
301 #% rmdir vp L L L
302 #
303 vop_rmdir {
304 IN struct vnode *dvp;
305 IN struct vnode *vp;
306 IN struct componentname *cnp;
307 };
308
309 #
310 #% symlink dvp L L L
311 #% symlink vpp - L -
312 #
313 vop_symlink {
314 IN struct vnode *dvp;
315 OUT struct vnode **vpp;
316 IN struct componentname *cnp;
317 IN struct vattr *vap;
318 IN char *target;
319 };
320
321 #
322 #% readdir vp L L L
323 #
324 vop_readdir {
325 IN struct vnode *vp;
326 INOUT struct uio *uio;
327 IN struct ucred *cred;
328 INOUT int *eofflag;
329 OUT int *ncookies;
330 INOUT u_long **cookies;
331 };
332
333 #
334 #% readlink vp L L L
335 #
336 vop_readlink {
337 IN struct vnode *vp;
338 INOUT struct uio *uio;
339 IN struct ucred *cred;
340 };
341
342 #
343 #% inactive vp L U U
344 #
345 vop_inactive {
346 IN struct vnode *vp;
347 IN struct thread *td;
348 };
349
350 #
351 #% reclaim vp U U U
352 #
353 vop_reclaim {
354 IN struct vnode *vp;
355 IN struct thread *td;
356 };
357
358 #
359 #lock vp ? ? ?
360 #! lock pre vop_lock_pre
361 #! lock post vop_lock_post
362 #
363 vop_lock {
364 IN struct vnode *vp;
365 IN int flags;
366 IN struct thread *td;
367 };
368
369 #
370 #unlock vp L ? L
371 #! unlock pre vop_unlock_pre
372 #! unlock post vop_unlock_post
373 #
374 vop_unlock {
375 IN struct vnode *vp;
376 IN int flags;
377 IN struct thread *td;
378 };
379
380 #
381 #% bmap vp L L L
382 #% bmap vpp - U -
383 #
384 vop_bmap {
385 IN struct vnode *vp;
386 IN daddr_t bn;
387 OUT struct vnode **vpp;
388 IN daddr_t *bnp;
389 OUT int *runp;
390 OUT int *runb;
391 };
392
393 #
394 # strategy vp L L L
395 #! strategy pre vop_strategy_pre
396 #
397 vop_strategy {
398 IN struct vnode *vp;
399 IN struct buf *bp;
400 };
401
402 #
403 #% getwritemount vp = = =
404 #
405 vop_getwritemount {
406 IN struct vnode *vp;
407 OUT struct mount **mpp;
408 };
409
410 #
411 #% print vp = = =
412 #
413 vop_print {
414 IN struct vnode *vp;
415 };
416
417 #
418 #% pathconf vp L L L
419 #
420 vop_pathconf {
421 IN struct vnode *vp;
422 IN int name;
423 OUT register_t *retval;
424 };
425
426 #
427 #% advlock vp U U U
428 #
429 vop_advlock {
430 IN struct vnode *vp;
431 IN caddr_t id;
432 IN int op;
433 IN struct flock *fl;
434 IN int flags;
435 };
436
437 #
438 #% reallocblks vp L L L
439 #
440 vop_reallocblks {
441 IN struct vnode *vp;
442 IN struct cluster_save *buflist;
443 };
444
445 #
446 #% getpages vp L L L
447 #
448 vop_getpages {
449 IN struct vnode *vp;
450 IN vm_page_t *m;
451 IN int count;
452 IN int reqpage;
453 IN vm_ooffset_t offset;
454 };
455
456 #
457 #% putpages vp L L L
458 #
459 vop_putpages {
460 IN struct vnode *vp;
461 IN vm_page_t *m;
462 IN int count;
463 IN int sync;
464 IN int *rtvals;
465 IN vm_ooffset_t offset;
466 };
467
468 #
469 #% freeblks vp - - -
470 #
471 # This call is used by the filesystem to release blocks back to
472 # device-driver. This is useful if the driver has a lengthy
473 # erase handling or similar.
474 #
475
476 vop_freeblks {
477 IN struct vnode *vp;
478 IN daddr_t addr;
479 IN daddr_t length;
480 };
481
482 #
483 #% getacl vp L L L
484 #
485 vop_getacl {
486 IN struct vnode *vp;
487 IN acl_type_t type;
488 OUT struct acl *aclp;
489 IN struct ucred *cred;
490 IN struct thread *td;
491 };
492
493 #
494 #% setacl vp L L L
495 #
496 vop_setacl {
497 IN struct vnode *vp;
498 IN acl_type_t type;
499 IN struct acl *aclp;
500 IN struct ucred *cred;
501 IN struct thread *td;
502 };
503
504 #
505 #% aclcheck vp = = =
506 #
507 vop_aclcheck {
508 IN struct vnode *vp;
509 IN acl_type_t type;
510 IN struct acl *aclp;
511 IN struct ucred *cred;
512 IN struct thread *td;
513 };
514
515 #
516 #% closeextattr vp L L L
517 #
518 vop_closeextattr {
519 IN struct vnode *vp;
520 IN int commit;
521 IN struct ucred *cred;
522 IN struct thread *td;
523 };
524
525 #
526 #% getextattr vp L L L
527 #
528 vop_getextattr {
529 IN struct vnode *vp;
530 IN int attrnamespace;
531 IN const char *name;
532 INOUT struct uio *uio;
533 OUT size_t *size;
534 IN struct ucred *cred;
535 IN struct thread *td;
536 };
537
538 #
539 #% openextattr vp L L L
540 #
541 vop_openextattr {
542 IN struct vnode *vp;
543 IN struct ucred *cred;
544 IN struct thread *td;
545 };
546
547 #
548 #% setextattr vp L L L
549 #
550 vop_setextattr {
551 IN struct vnode *vp;
552 IN int attrnamespace;
553 IN const char *name;
554 INOUT struct uio *uio;
555 IN struct ucred *cred;
556 IN struct thread *td;
557 };
558
559 #
560 #% createvobject vp L L L
561 #
562 vop_createvobject {
563 IN struct vnode *vp;
564 IN struct ucred *cred;
565 IN struct thread *td;
566 };
567
568 #
569 #% destroyvobject vp L L L
570 #
571 vop_destroyvobject {
572 IN struct vnode *vp;
573 };
574
575 #
576 #% getvobject vp L L L
577 #
578 vop_getvobject {
579 IN struct vnode *vp;
580 OUT struct vm_object **objpp;
581 };
582
583 #
584 #% refreshlabel vp L L L
585 #
586 vop_refreshlabel {
587 IN struct vnode *vp;
588 IN struct ucred *cred;
589 IN struct thread *td;
590 };
591
592 #
593 #% setlabel vp L L L
594 #
595 vop_setlabel {
596 IN struct vnode *vp;
597 IN struct label *label;
598 IN struct ucred *cred;
599 IN struct thread *td;
600 };
Cache object: 190af22f4e5c57b9598e9e95e547705d
|