Deleted Added
full compact
vnode_if.src (30474) vnode_if.src (30492)
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
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# $Id: vnode_if.src,v 1.13 1997/09/14 02:35:25 peter Exp $
34# $Id: vnode_if.src,v 1.14 1997/10/16 10:48:00 phk Exp $
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.
47# U: unlocked/
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.
51#
52
53#
54#% lookup dvp L ? ?
55#% lookup vpp - L -
56#
57# XXX - the lookup locking protocol defies simple description and depends
58# on the flags and operation fields in the (cnp) structure. Note
59# especially that *vpp may equal dvp and both may be locked.
60#
61vop_lookup {
62 IN struct vnode *dvp;
63 INOUT struct vnode **vpp;
64 IN struct componentname *cnp;
65};
66
67#
68#% cachedlookup dvp L ? ?
69#% cachedlookup vpp - L -
70#
71# This must be an exact copy of lookup. See kern/vfs_cache.c for details.
72#
73vop_cachedlookup {
74 IN struct vnode *dvp;
75 INOUT struct vnode **vpp;
76 IN struct componentname *cnp;
77};
78
79#
80#% create dvp L U U
81#% create vpp - L -
82#
83vop_create {
84 IN WILLRELE struct vnode *dvp;
85 OUT struct vnode **vpp;
86 IN struct componentname *cnp;
87 IN struct vattr *vap;
88};
89
90#
91#% whiteout dvp L L L
92#% whiteout cnp - - -
93#% whiteout flag - - -
94#
95vop_whiteout {
96 IN WILLRELE struct vnode *dvp;
97 IN struct componentname *cnp;
98 IN int flags;
99};
100
101#
102#% mknod dvp L U U
103#% mknod vpp - X -
104#
105vop_mknod {
106 IN WILLRELE struct vnode *dvp;
107 OUT WILLRELE struct vnode **vpp;
108 IN struct componentname *cnp;
109 IN struct vattr *vap;
110};
111
112#
113#% open vp L L L
114#
115vop_open {
116 IN struct vnode *vp;
117 IN int mode;
118 IN struct ucred *cred;
119 IN struct proc *p;
120};
121
122#
123#% close vp U U U
124#
125vop_close {
126 IN struct vnode *vp;
127 IN int fflag;
128 IN struct ucred *cred;
129 IN struct proc *p;
130};
131
132#
133#% access vp L L L
134#
135vop_access {
136 IN struct vnode *vp;
137 IN int mode;
138 IN struct ucred *cred;
139 IN struct proc *p;
140};
141
142#
143#% getattr vp = = =
144#
145vop_getattr {
146 IN struct vnode *vp;
147 IN struct vattr *vap;
148 IN struct ucred *cred;
149 IN struct proc *p;
150};
151
152#
153#% setattr vp L L L
154#
155vop_setattr {
156 IN struct vnode *vp;
157 IN struct vattr *vap;
158 IN struct ucred *cred;
159 IN struct proc *p;
160};
161
162#
163#% read vp L L L
164#
165vop_read {
166 IN struct vnode *vp;
167 INOUT struct uio *uio;
168 IN int ioflag;
169 IN struct ucred *cred;
170};
171
172#
173#% write vp L L L
174#
175vop_write {
176 IN struct vnode *vp;
177 INOUT struct uio *uio;
178 IN int ioflag;
179 IN struct ucred *cred;
180};
181
182#
183#% lease vp = = =
184#
185vop_lease {
186 IN struct vnode *vp;
187 IN struct proc *p;
188 IN struct ucred *cred;
189 IN int flag;
190};
191
192#
193#% ioctl vp U U U
194#
195vop_ioctl {
196 IN struct vnode *vp;
197 IN u_long command;
198 IN caddr_t data;
199 IN int fflag;
200 IN struct ucred *cred;
201 IN struct proc *p;
202};
203
204#
205#% poll vp U U U
206#
207vop_poll {
208 IN struct vnode *vp;
209 IN int events;
210 IN struct ucred *cred;
211 IN struct proc *p;
212};
213
214#
215#% revoke vp U U U
216#
217vop_revoke {
218 IN struct vnode *vp;
219 IN int flags;
220};
221
222#
223# XXX - not used
224#
225vop_mmap {
226 IN struct vnode *vp;
227 IN int fflags;
228 IN struct ucred *cred;
229 IN struct proc *p;
230};
231
232#
233#% fsync vp L L L
234#
235vop_fsync {
236 IN struct vnode *vp;
237 IN struct ucred *cred;
238 IN int waitfor;
239 IN struct proc *p;
240};
241
242#
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.
47# U: unlocked/
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.
51#
52
53#
54#% lookup dvp L ? ?
55#% lookup vpp - L -
56#
57# XXX - the lookup locking protocol defies simple description and depends
58# on the flags and operation fields in the (cnp) structure. Note
59# especially that *vpp may equal dvp and both may be locked.
60#
61vop_lookup {
62 IN struct vnode *dvp;
63 INOUT struct vnode **vpp;
64 IN struct componentname *cnp;
65};
66
67#
68#% cachedlookup dvp L ? ?
69#% cachedlookup vpp - L -
70#
71# This must be an exact copy of lookup. See kern/vfs_cache.c for details.
72#
73vop_cachedlookup {
74 IN struct vnode *dvp;
75 INOUT struct vnode **vpp;
76 IN struct componentname *cnp;
77};
78
79#
80#% create dvp L U U
81#% create vpp - L -
82#
83vop_create {
84 IN WILLRELE struct vnode *dvp;
85 OUT struct vnode **vpp;
86 IN struct componentname *cnp;
87 IN struct vattr *vap;
88};
89
90#
91#% whiteout dvp L L L
92#% whiteout cnp - - -
93#% whiteout flag - - -
94#
95vop_whiteout {
96 IN WILLRELE struct vnode *dvp;
97 IN struct componentname *cnp;
98 IN int flags;
99};
100
101#
102#% mknod dvp L U U
103#% mknod vpp - X -
104#
105vop_mknod {
106 IN WILLRELE struct vnode *dvp;
107 OUT WILLRELE struct vnode **vpp;
108 IN struct componentname *cnp;
109 IN struct vattr *vap;
110};
111
112#
113#% open vp L L L
114#
115vop_open {
116 IN struct vnode *vp;
117 IN int mode;
118 IN struct ucred *cred;
119 IN struct proc *p;
120};
121
122#
123#% close vp U U U
124#
125vop_close {
126 IN struct vnode *vp;
127 IN int fflag;
128 IN struct ucred *cred;
129 IN struct proc *p;
130};
131
132#
133#% access vp L L L
134#
135vop_access {
136 IN struct vnode *vp;
137 IN int mode;
138 IN struct ucred *cred;
139 IN struct proc *p;
140};
141
142#
143#% getattr vp = = =
144#
145vop_getattr {
146 IN struct vnode *vp;
147 IN struct vattr *vap;
148 IN struct ucred *cred;
149 IN struct proc *p;
150};
151
152#
153#% setattr vp L L L
154#
155vop_setattr {
156 IN struct vnode *vp;
157 IN struct vattr *vap;
158 IN struct ucred *cred;
159 IN struct proc *p;
160};
161
162#
163#% read vp L L L
164#
165vop_read {
166 IN struct vnode *vp;
167 INOUT struct uio *uio;
168 IN int ioflag;
169 IN struct ucred *cred;
170};
171
172#
173#% write vp L L L
174#
175vop_write {
176 IN struct vnode *vp;
177 INOUT struct uio *uio;
178 IN int ioflag;
179 IN struct ucred *cred;
180};
181
182#
183#% lease vp = = =
184#
185vop_lease {
186 IN struct vnode *vp;
187 IN struct proc *p;
188 IN struct ucred *cred;
189 IN int flag;
190};
191
192#
193#% ioctl vp U U U
194#
195vop_ioctl {
196 IN struct vnode *vp;
197 IN u_long command;
198 IN caddr_t data;
199 IN int fflag;
200 IN struct ucred *cred;
201 IN struct proc *p;
202};
203
204#
205#% poll vp U U U
206#
207vop_poll {
208 IN struct vnode *vp;
209 IN int events;
210 IN struct ucred *cred;
211 IN struct proc *p;
212};
213
214#
215#% revoke vp U U U
216#
217vop_revoke {
218 IN struct vnode *vp;
219 IN int flags;
220};
221
222#
223# XXX - not used
224#
225vop_mmap {
226 IN struct vnode *vp;
227 IN int fflags;
228 IN struct ucred *cred;
229 IN struct proc *p;
230};
231
232#
233#% fsync vp L L L
234#
235vop_fsync {
236 IN struct vnode *vp;
237 IN struct ucred *cred;
238 IN int waitfor;
239 IN struct proc *p;
240};
241
242#
243# XXX - not used
244# Needs work: Is newoff right? What's it mean?
245#
246vop_seek {
247 IN struct vnode *vp;
248 IN off_t oldoff;
249 IN off_t newoff;
250 IN struct ucred *cred;
251};
252
253#
254#% remove dvp L U U
255#% remove vp L U U
256#
257vop_remove {
258 IN WILLRELE struct vnode *dvp;
259 IN WILLRELE struct vnode *vp;
260 IN struct componentname *cnp;
261};
262
263#
264#% link vp U U U
265#% link tdvp L U U
266#
267vop_link {
268 IN WILLRELE struct vnode *tdvp;
269 IN struct vnode *vp;
270 IN struct componentname *cnp;
271};
272
273#
274#% rename fdvp U U U
275#% rename fvp U U U
276#% rename tdvp L U U
277#% rename tvp X U U
278#
279vop_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 U U
290#% mkdir vpp - L -
291#
292vop_mkdir {
293 IN WILLRELE 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 U U
301#% rmdir vp L U U
302#
303vop_rmdir {
304 IN WILLRELE struct vnode *dvp;
305 IN WILLRELE struct vnode *vp;
306 IN struct componentname *cnp;
307};
308
309#
310#% symlink dvp L U U
311#% symlink vpp - U -
312#
313# XXX - note that the return vnode has already been VRELE'ed
314# by the filesystem layer. To use it you must use vget,
315# possibly with a further namei.
316#
317vop_symlink {
318 IN WILLRELE struct vnode *dvp;
319 OUT WILLRELE struct vnode **vpp;
320 IN struct componentname *cnp;
321 IN struct vattr *vap;
322 IN char *target;
323};
324
325#
326#% readdir vp L L L
327#
328vop_readdir {
329 IN struct vnode *vp;
330 INOUT struct uio *uio;
331 IN struct ucred *cred;
332 INOUT int *eofflag;
333 OUT int *ncookies;
334 INOUT u_long **cookies;
335};
336
337#
338#% readlink vp L L L
339#
340vop_readlink {
341 IN struct vnode *vp;
342 INOUT struct uio *uio;
343 IN struct ucred *cred;
344};
345
346#
347#% abortop dvp = = =
348#
349vop_abortop {
350 IN struct vnode *dvp;
351 IN struct componentname *cnp;
352};
353
354#
355#% inactive vp L U U
356#
357vop_inactive {
358 IN struct vnode *vp;
359 IN struct proc *p;
360};
361
362#
363#% reclaim vp U U U
364#
365vop_reclaim {
366 IN struct vnode *vp;
367 IN struct proc *p;
368};
369
370#
371#% lock vp U L U
372#
373vop_lock {
374 IN struct vnode *vp;
375 IN int flags;
376 IN struct proc *p;
377};
378
379#
380#% unlock vp L U L
381#
382vop_unlock {
383 IN struct vnode *vp;
384 IN int flags;
385 IN struct proc *p;
386};
387
388#
389#% bmap vp L L L
390#% bmap vpp - U -
391#
392vop_bmap {
393 IN struct vnode *vp;
394 IN daddr_t bn;
395 OUT struct vnode **vpp;
396 IN daddr_t *bnp;
397 OUT int *runp;
398 OUT int *runb;
399};
400
401#
402# Needs work: no vp?
403#
404#vop_strategy {
405# IN struct buf *bp;
406#};
407
408#
409#% print vp = = =
410#
411vop_print {
412 IN struct vnode *vp;
413};
414
415#
416#% islocked vp = = =
417#
418vop_islocked {
419 IN struct vnode *vp;
420};
421
422#
423#% pathconf vp L L L
424#
425vop_pathconf {
426 IN struct vnode *vp;
427 IN int name;
428 OUT register_t *retval;
429};
430
431#
432#% advlock vp U U U
433#
434vop_advlock {
435 IN struct vnode *vp;
436 IN caddr_t id;
437 IN int op;
438 IN struct flock *fl;
439 IN int flags;
440};
441
442#
443#% reallocblks vp L L L
444#
445vop_reallocblks {
446 IN struct vnode *vp;
447 IN struct cluster_save *buflist;
448};
449
243#% remove dvp L U U
244#% remove vp L U U
245#
246vop_remove {
247 IN WILLRELE struct vnode *dvp;
248 IN WILLRELE struct vnode *vp;
249 IN struct componentname *cnp;
250};
251
252#
253#% link vp U U U
254#% link tdvp L U U
255#
256vop_link {
257 IN WILLRELE struct vnode *tdvp;
258 IN struct vnode *vp;
259 IN struct componentname *cnp;
260};
261
262#
263#% rename fdvp U U U
264#% rename fvp U U U
265#% rename tdvp L U U
266#% rename tvp X U U
267#
268vop_rename {
269 IN WILLRELE struct vnode *fdvp;
270 IN WILLRELE struct vnode *fvp;
271 IN struct componentname *fcnp;
272 IN WILLRELE struct vnode *tdvp;
273 IN WILLRELE struct vnode *tvp;
274 IN struct componentname *tcnp;
275};
276
277#
278#% mkdir dvp L U U
279#% mkdir vpp - L -
280#
281vop_mkdir {
282 IN WILLRELE struct vnode *dvp;
283 OUT struct vnode **vpp;
284 IN struct componentname *cnp;
285 IN struct vattr *vap;
286};
287
288#
289#% rmdir dvp L U U
290#% rmdir vp L U U
291#
292vop_rmdir {
293 IN WILLRELE struct vnode *dvp;
294 IN WILLRELE struct vnode *vp;
295 IN struct componentname *cnp;
296};
297
298#
299#% symlink dvp L U U
300#% symlink vpp - U -
301#
302# XXX - note that the return vnode has already been VRELE'ed
303# by the filesystem layer. To use it you must use vget,
304# possibly with a further namei.
305#
306vop_symlink {
307 IN WILLRELE struct vnode *dvp;
308 OUT WILLRELE struct vnode **vpp;
309 IN struct componentname *cnp;
310 IN struct vattr *vap;
311 IN char *target;
312};
313
314#
315#% readdir vp L L L
316#
317vop_readdir {
318 IN struct vnode *vp;
319 INOUT struct uio *uio;
320 IN struct ucred *cred;
321 INOUT int *eofflag;
322 OUT int *ncookies;
323 INOUT u_long **cookies;
324};
325
326#
327#% readlink vp L L L
328#
329vop_readlink {
330 IN struct vnode *vp;
331 INOUT struct uio *uio;
332 IN struct ucred *cred;
333};
334
335#
336#% abortop dvp = = =
337#
338vop_abortop {
339 IN struct vnode *dvp;
340 IN struct componentname *cnp;
341};
342
343#
344#% inactive vp L U U
345#
346vop_inactive {
347 IN struct vnode *vp;
348 IN struct proc *p;
349};
350
351#
352#% reclaim vp U U U
353#
354vop_reclaim {
355 IN struct vnode *vp;
356 IN struct proc *p;
357};
358
359#
360#% lock vp U L U
361#
362vop_lock {
363 IN struct vnode *vp;
364 IN int flags;
365 IN struct proc *p;
366};
367
368#
369#% unlock vp L U L
370#
371vop_unlock {
372 IN struct vnode *vp;
373 IN int flags;
374 IN struct proc *p;
375};
376
377#
378#% bmap vp L L L
379#% bmap vpp - U -
380#
381vop_bmap {
382 IN struct vnode *vp;
383 IN daddr_t bn;
384 OUT struct vnode **vpp;
385 IN daddr_t *bnp;
386 OUT int *runp;
387 OUT int *runb;
388};
389
390#
391# Needs work: no vp?
392#
393#vop_strategy {
394# IN struct buf *bp;
395#};
396
397#
398#% print vp = = =
399#
400vop_print {
401 IN struct vnode *vp;
402};
403
404#
405#% islocked vp = = =
406#
407vop_islocked {
408 IN struct vnode *vp;
409};
410
411#
412#% pathconf vp L L L
413#
414vop_pathconf {
415 IN struct vnode *vp;
416 IN int name;
417 OUT register_t *retval;
418};
419
420#
421#% advlock vp U U U
422#
423vop_advlock {
424 IN struct vnode *vp;
425 IN caddr_t id;
426 IN int op;
427 IN struct flock *fl;
428 IN int flags;
429};
430
431#
432#% reallocblks vp L L L
433#
434vop_reallocblks {
435 IN struct vnode *vp;
436 IN struct cluster_save *buflist;
437};
438
450#
451#% update vp L L L
452#
453vop_update {
454 IN struct vnode *vp;
455 IN struct timeval *access;
456 IN struct timeval *modify;
457 IN int waitfor;
458};
459
460vop_getpages {
461 IN struct vnode *vp;
462 IN vm_page_t *m;
463 IN int count;
464 IN int reqpage;
465 IN vm_ooffset_t offset;
466};
467
468vop_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# Needs work: no vp?
479#
480#vop_bwrite {
481# IN struct buf *bp;
482#};
439vop_getpages {
440 IN struct vnode *vp;
441 IN vm_page_t *m;
442 IN int count;
443 IN int reqpage;
444 IN vm_ooffset_t offset;
445};
446
447vop_putpages {
448 IN struct vnode *vp;
449 IN vm_page_t *m;
450 IN int count;
451 IN int sync;
452 IN int *rtvals;
453 IN vm_ooffset_t offset;
454};
455
456#
457# Needs work: no vp?
458#
459#vop_bwrite {
460# IN struct buf *bp;
461#};