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.1/sys/kern/vnode_if.src 108686 2003-01-04 22:10:36Z phk $
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 # specstrategy vp L L L
404 #! specstrategy pre vop_strategy_pre
405 #
406 vop_specstrategy {
407 IN struct vnode *vp;
408 IN struct buf *bp;
409 };
410
411 #
412 #% getwritemount vp = = =
413 #
414 vop_getwritemount {
415 IN struct vnode *vp;
416 OUT struct mount **mpp;
417 };
418
419 #
420 #% print vp = = =
421 #
422 vop_print {
423 IN struct vnode *vp;
424 };
425
426 #
427 #% pathconf vp L L L
428 #
429 vop_pathconf {
430 IN struct vnode *vp;
431 IN int name;
432 OUT register_t *retval;
433 };
434
435 #
436 #% advlock vp U U U
437 #
438 vop_advlock {
439 IN struct vnode *vp;
440 IN caddr_t id;
441 IN int op;
442 IN struct flock *fl;
443 IN int flags;
444 };
445
446 #
447 #% reallocblks vp L L L
448 #
449 vop_reallocblks {
450 IN struct vnode *vp;
451 IN struct cluster_save *buflist;
452 };
453
454 #
455 #% getpages vp L L L
456 #
457 vop_getpages {
458 IN struct vnode *vp;
459 IN vm_page_t *m;
460 IN int count;
461 IN int reqpage;
462 IN vm_ooffset_t offset;
463 };
464
465 #
466 #% putpages vp L L L
467 #
468 vop_putpages {
469 IN struct vnode *vp;
470 IN vm_page_t *m;
471 IN int count;
472 IN int sync;
473 IN int *rtvals;
474 IN vm_ooffset_t offset;
475 };
476
477 #
478 #% freeblks vp - - -
479 #
480 # This call is used by the filesystem to release blocks back to
481 # device-driver. This is useful if the driver has a lengthy
482 # erase handling or similar.
483 #
484
485 vop_freeblks {
486 IN struct vnode *vp;
487 IN daddr_t addr;
488 IN daddr_t length;
489 };
490
491 #
492 #% getacl vp L L L
493 #
494 vop_getacl {
495 IN struct vnode *vp;
496 IN acl_type_t type;
497 OUT struct acl *aclp;
498 IN struct ucred *cred;
499 IN struct thread *td;
500 };
501
502 #
503 #% setacl vp L L L
504 #
505 vop_setacl {
506 IN struct vnode *vp;
507 IN acl_type_t type;
508 IN struct acl *aclp;
509 IN struct ucred *cred;
510 IN struct thread *td;
511 };
512
513 #
514 #% aclcheck vp = = =
515 #
516 vop_aclcheck {
517 IN struct vnode *vp;
518 IN acl_type_t type;
519 IN struct acl *aclp;
520 IN struct ucred *cred;
521 IN struct thread *td;
522 };
523
524 #
525 #% closeextattr vp L L L
526 #
527 vop_closeextattr {
528 IN struct vnode *vp;
529 IN int commit;
530 IN struct ucred *cred;
531 IN struct thread *td;
532 };
533
534 #
535 #% getextattr vp L L L
536 #
537 vop_getextattr {
538 IN struct vnode *vp;
539 IN int attrnamespace;
540 IN const char *name;
541 INOUT struct uio *uio;
542 OUT size_t *size;
543 IN struct ucred *cred;
544 IN struct thread *td;
545 };
546
547 #
548 #% openextattr vp L L L
549 #
550 vop_openextattr {
551 IN struct vnode *vp;
552 IN struct ucred *cred;
553 IN struct thread *td;
554 };
555
556 #
557 #% setextattr vp L L L
558 #
559 vop_setextattr {
560 IN struct vnode *vp;
561 IN int attrnamespace;
562 IN const char *name;
563 INOUT struct uio *uio;
564 IN struct ucred *cred;
565 IN struct thread *td;
566 };
567
568 #
569 #% createvobject vp L L L
570 #
571 vop_createvobject {
572 IN struct vnode *vp;
573 IN struct ucred *cred;
574 IN struct thread *td;
575 };
576
577 #
578 #% destroyvobject vp L L L
579 #
580 vop_destroyvobject {
581 IN struct vnode *vp;
582 };
583
584 #
585 #% getvobject vp L L L
586 #
587 vop_getvobject {
588 IN struct vnode *vp;
589 OUT struct vm_object **objpp;
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: 6984d432ffc13c0066a0e03111176e2e
|