]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/vnode_if.h
xnu-124.13.tar.gz
[apple/xnu.git] / bsd / sys / vnode_if.h
CommitLineData
1c79356b
A
1
2/*
3 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 *
5 * @APPLE_LICENSE_HEADER_START@
6 *
7 * The contents of this file constitute Original Code as defined in and
8 * are subject to the Apple Public Source License Version 1.1 (the
9 * "License"). You may not use this file except in compliance with the
10 * License. Please obtain a copy of the License at
11 * http://www.apple.com/publicsource and read it before using this file.
12 *
13 * This Original Code and all software distributed under the License are
14 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
18 * License for the specific language governing rights and limitations
19 * under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*
24 * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
25 * Copyright (c) 1992, 1993, 1994, 1995
26 * The Regents of the University of California. All rights reserved.
27 *
28 * Redistribution and use in source and binary forms, with or without
29 * modification, are permitted provided that the following conditions
30 * are met:
31 * 1. Redistributions of source code must retain the above copyright
32 * notice, this list of conditions and the following disclaimer.
33 * 2. Redistributions in binary form must reproduce the above copyright
34 * notice, this list of conditions and the following disclaimer in the
35 * documentation and/or other materials provided with the distribution.
36 * 3. All advertising materials mentioning features or use of this software
37 * must display the following acknowledgement:
38 * This product includes software developed by the University of
39 * California, Berkeley and its contributors.
40 * 4. Neither the name of the University nor the names of its contributors
41 * may be used to endorse or promote products derived from this software
42 * without specific prior written permission.
43 *
44 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS AND
45 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
48 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54 * SUCH DAMAGE.
55 */
56
57
58/*
59 * Warning: This file is generated automatically.
60 * (Modifications made here may easily be lost!)
61 *
62 * Created by the script:
63 * @(#)vnode_if.sh 8.7 (Berkeley) 5/11/95
64 */
65
66
67#ifndef _VNODE_IF_H_
68#define _VNODE_IF_H_
69
70extern struct vnodeop_desc vop_default_desc;
71
72
73struct vop_lookup_args {
74 struct vnodeop_desc *a_desc;
75 struct vnode *a_dvp;
76 struct vnode **a_vpp;
77 struct componentname *a_cnp;
78};
79extern struct vnodeop_desc vop_lookup_desc;
80#define VOP_LOOKUP(dvp, vpp, cnp) _VOP_LOOKUP(dvp, vpp, cnp)
81static __inline int _VOP_LOOKUP(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
82{
83 struct vop_lookup_args a;
84 a.a_desc = VDESC(vop_lookup);
85 a.a_dvp = dvp;
86 a.a_vpp = vpp;
87 a.a_cnp = cnp;
88 return (VCALL(dvp, VOFFSET(vop_lookup), &a));
89}
90
91struct vop_cachedlookup_args {
92 struct vnodeop_desc *a_desc;
93 struct vnode *a_dvp;
94 struct vnode **a_vpp;
95 struct componentname *a_cnp;
96};
97extern struct vnodeop_desc vop_cachedlookup_desc;
98#define VOP_CACHEDLOOKUP(dvp, vpp, cnp) _VOP_CACHEDLOOKUP(dvp, vpp, cnp)
99static __inline int _VOP_CACHEDLOOKUP(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
100{
101 struct vop_cachedlookup_args a;
102 a.a_desc = VDESC(vop_cachedlookup);
103 a.a_dvp = dvp;
104 a.a_vpp = vpp;
105 a.a_cnp = cnp;
106 return (VCALL(dvp, VOFFSET(vop_cachedlookup), &a));
107}
108
109struct vop_create_args {
110 struct vnodeop_desc *a_desc;
111 struct vnode *a_dvp;
112 struct vnode **a_vpp;
113 struct componentname *a_cnp;
114 struct vattr *a_vap;
115};
116extern struct vnodeop_desc vop_create_desc;
117#define VOP_CREATE(dvp, vpp, cnp, vap) _VOP_CREATE(dvp, vpp, cnp, vap)
118static __inline int _VOP_CREATE(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
119{
120 struct vop_create_args a;
121 a.a_desc = VDESC(vop_create);
122 a.a_dvp = dvp;
123 a.a_vpp = vpp;
124 a.a_cnp = cnp;
125 a.a_vap = vap;
126 return (VCALL(dvp, VOFFSET(vop_create), &a));
127}
128
129struct vop_whiteout_args {
130 struct vnodeop_desc *a_desc;
131 struct vnode *a_dvp;
132 struct componentname *a_cnp;
133 int a_flags;
134};
135extern struct vnodeop_desc vop_whiteout_desc;
136#define VOP_WHITEOUT(dvp, cnp, flags) _VOP_WHITEOUT(dvp, cnp, flags)
137static __inline int _VOP_WHITEOUT(struct vnode *dvp, struct componentname *cnp, int flags)
138{
139 struct vop_whiteout_args a;
140 a.a_desc = VDESC(vop_whiteout);
141 a.a_dvp = dvp;
142 a.a_cnp = cnp;
143 a.a_flags = flags;
144 return (VCALL(dvp, VOFFSET(vop_whiteout), &a));
145}
146
147struct vop_mknod_args {
148 struct vnodeop_desc *a_desc;
149 struct vnode *a_dvp;
150 struct vnode **a_vpp;
151 struct componentname *a_cnp;
152 struct vattr *a_vap;
153};
154extern struct vnodeop_desc vop_mknod_desc;
155#define VOP_MKNOD(dvp, vpp, cnp, vap) _VOP_MKNOD(dvp, vpp, cnp, vap)
156static __inline int _VOP_MKNOD(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
157{
158 struct vop_mknod_args a;
159 a.a_desc = VDESC(vop_mknod);
160 a.a_dvp = dvp;
161 a.a_vpp = vpp;
162 a.a_cnp = cnp;
163 a.a_vap = vap;
164 return (VCALL(dvp, VOFFSET(vop_mknod), &a));
165}
166
167struct vop_mkcomplex_args {
168 struct vnodeop_desc *a_desc;
169 struct vnode *a_dvp;
170 struct vnode **a_vpp;
171 struct componentname *a_cnp;
172 struct vattr *a_vap;
173 u_long a_type;
174};
175extern struct vnodeop_desc vop_mkcomplex_desc;
176#define VOP_MKCOMPLEX(dvp, vpp, cnp, vap, type) _VOP_MKCOMPLEX(dvp, vpp, cnp, vap, type)
177static __inline int _VOP_MKCOMPLEX(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap, u_long type)
178{
179 struct vop_mkcomplex_args a;
180 a.a_desc = VDESC(vop_mkcomplex);
181 a.a_dvp = dvp;
182 a.a_vpp = vpp;
183 a.a_cnp = cnp;
184 a.a_vap = vap;
185 a.a_type = type;
186 return (VCALL(dvp, VOFFSET(vop_mkcomplex), &a));
187}
188
189struct vop_open_args {
190 struct vnodeop_desc *a_desc;
191 struct vnode *a_vp;
192 int a_mode;
193 struct ucred *a_cred;
194 struct proc *a_p;
195};
196extern struct vnodeop_desc vop_open_desc;
197#define VOP_OPEN(vp, mode, cred, p) _VOP_OPEN(vp, mode, cred, p)
198static __inline int _VOP_OPEN(struct vnode *vp, int mode, struct ucred *cred, struct proc *p)
199{
200 struct vop_open_args a;
201 a.a_desc = VDESC(vop_open);
202 a.a_vp = vp;
203 a.a_mode = mode;
204 a.a_cred = cred;
205 a.a_p = p;
206 return (VCALL(vp, VOFFSET(vop_open), &a));
207}
208
209struct vop_close_args {
210 struct vnodeop_desc *a_desc;
211 struct vnode *a_vp;
212 int a_fflag;
213 struct ucred *a_cred;
214 struct proc *a_p;
215};
216extern struct vnodeop_desc vop_close_desc;
217#define VOP_CLOSE(vp, fflag, cred, p) _VOP_CLOSE(vp, fflag, cred, p)
218static __inline int _VOP_CLOSE(struct vnode *vp, int fflag, struct ucred *cred, struct proc *p)
219{
220 struct vop_close_args a;
221 a.a_desc = VDESC(vop_close);
222 a.a_vp = vp;
223 a.a_fflag = fflag;
224 a.a_cred = cred;
225 a.a_p = p;
226 return (VCALL(vp, VOFFSET(vop_close), &a));
227}
228
229struct vop_access_args {
230 struct vnodeop_desc *a_desc;
231 struct vnode *a_vp;
232 int a_mode;
233 struct ucred *a_cred;
234 struct proc *a_p;
235};
236extern struct vnodeop_desc vop_access_desc;
237#define VOP_ACCESS(vp, mode, cred, p) _VOP_ACCESS(vp, mode, cred, p)
238static __inline int _VOP_ACCESS(struct vnode *vp, int mode, struct ucred *cred, struct proc *p)
239{
240 struct vop_access_args a;
241 a.a_desc = VDESC(vop_access);
242 a.a_vp = vp;
243 a.a_mode = mode;
244 a.a_cred = cred;
245 a.a_p = p;
246 return (VCALL(vp, VOFFSET(vop_access), &a));
247}
248
249struct vop_getattr_args {
250 struct vnodeop_desc *a_desc;
251 struct vnode *a_vp;
252 struct vattr *a_vap;
253 struct ucred *a_cred;
254 struct proc *a_p;
255};
256extern struct vnodeop_desc vop_getattr_desc;
257#define VOP_GETATTR(vp, vap, cred, p) _VOP_GETATTR(vp, vap, cred, p)
258static __inline int _VOP_GETATTR(struct vnode *vp, struct vattr *vap, struct ucred *cred, struct proc *p)
259{
260 struct vop_getattr_args a;
261 a.a_desc = VDESC(vop_getattr);
262 a.a_vp = vp;
263 a.a_vap = vap;
264 a.a_cred = cred;
265 a.a_p = p;
266 return (VCALL(vp, VOFFSET(vop_getattr), &a));
267}
268
269struct vop_setattr_args {
270 struct vnodeop_desc *a_desc;
271 struct vnode *a_vp;
272 struct vattr *a_vap;
273 struct ucred *a_cred;
274 struct proc *a_p;
275};
276extern struct vnodeop_desc vop_setattr_desc;
277#define VOP_SETATTR(vp, vap, cred, p) _VOP_SETATTR(vp, vap, cred, p)
278static __inline int _VOP_SETATTR(struct vnode *vp, struct vattr *vap, struct ucred *cred, struct proc *p)
279{
280 struct vop_setattr_args a;
281 a.a_desc = VDESC(vop_setattr);
282 a.a_vp = vp;
283 a.a_vap = vap;
284 a.a_cred = cred;
285 a.a_p = p;
286 return (VCALL(vp, VOFFSET(vop_setattr), &a));
287}
288
289struct vop_getattrlist_args {
290 struct vnodeop_desc *a_desc;
291 struct vnode *a_vp;
292 struct attrlist *a_alist;
293 struct uio *a_uio;
294 struct ucred *a_cred;
295 struct proc *a_p;
296};
297extern struct vnodeop_desc vop_getattrlist_desc;
298#define VOP_GETATTRLIST(vp, alist, uio, cred, p) _VOP_GETATTRLIST(vp, alist, uio, cred, p)
299static __inline int _VOP_GETATTRLIST(struct vnode *vp, struct attrlist *alist, struct uio *uio, struct ucred *cred, struct proc *p)
300{
301 struct vop_getattrlist_args a;
302 a.a_desc = VDESC(vop_getattrlist);
303 a.a_vp = vp;
304 a.a_alist = alist;
305 a.a_uio = uio;
306 a.a_cred = cred;
307 a.a_p = p;
308 return (VCALL(vp, VOFFSET(vop_getattrlist), &a));
309}
310
311struct vop_setattrlist_args {
312 struct vnodeop_desc *a_desc;
313 struct vnode *a_vp;
314 struct attrlist *a_alist;
315 struct uio *a_uio;
316 struct ucred *a_cred;
317 struct proc *a_p;
318};
319extern struct vnodeop_desc vop_setattrlist_desc;
320#define VOP_SETATTRLIST(vp, alist, uio, cred, p) _VOP_SETATTRLIST(vp, alist, uio, cred, p)
321static __inline int _VOP_SETATTRLIST(struct vnode *vp, struct attrlist *alist, struct uio *uio, struct ucred *cred, struct proc *p)
322{
323 struct vop_setattrlist_args a;
324 a.a_desc = VDESC(vop_setattrlist);
325 a.a_vp = vp;
326 a.a_alist = alist;
327 a.a_uio = uio;
328 a.a_cred = cred;
329 a.a_p = p;
330 return (VCALL(vp, VOFFSET(vop_setattrlist), &a));
331}
332
333struct vop_read_args {
334 struct vnodeop_desc *a_desc;
335 struct vnode *a_vp;
336 struct uio *a_uio;
337 int a_ioflag;
338 struct ucred *a_cred;
339};
340extern struct vnodeop_desc vop_read_desc;
341#define VOP_READ(vp, uio, ioflag, cred) _VOP_READ(vp, uio, ioflag, cred)
342static __inline int _VOP_READ(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
343{
344 struct vop_read_args a;
345 a.a_desc = VDESC(vop_read);
346 a.a_vp = vp;
347 a.a_uio = uio;
348 a.a_ioflag = ioflag;
349 a.a_cred = cred;
350 {
351 int _err;
352 extern int ubc_hold();
353 extern void ubc_rele();
354 int _didhold = ubc_hold(vp);
355 _err = VCALL(vp, VOFFSET(vop_read), &a);
356 if (_didhold)
357 ubc_rele(vp);
358 return (_err);
359 }
360}
361
362struct vop_write_args {
363 struct vnodeop_desc *a_desc;
364 struct vnode *a_vp;
365 struct uio *a_uio;
366 int a_ioflag;
367 struct ucred *a_cred;
368};
369extern struct vnodeop_desc vop_write_desc;
370#define VOP_WRITE(vp, uio, ioflag, cred) _VOP_WRITE(vp, uio, ioflag, cred)
371static __inline int _VOP_WRITE(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
372{
373 struct vop_write_args a;
374 a.a_desc = VDESC(vop_write);
375 a.a_vp = vp;
376 a.a_uio = uio;
377 a.a_ioflag = ioflag;
378 a.a_cred = cred;
379 {
380 int _err;
381 extern int ubc_hold();
382 extern void ubc_rele();
383 int _didhold = ubc_hold(vp);
384 _err = VCALL(vp, VOFFSET(vop_write), &a);
385 if (_didhold)
386 ubc_rele(vp);
387 return (_err);
388 }
389}
390
391struct vop_lease_args {
392 struct vnodeop_desc *a_desc;
393 struct vnode *a_vp;
394 struct proc *a_p;
395 struct ucred *a_cred;
396 int a_flag;
397};
398extern struct vnodeop_desc vop_lease_desc;
399#define VOP_LEASE(vp, p, cred, flag) _VOP_LEASE(vp, p, cred, flag)
400static __inline int _VOP_LEASE(struct vnode *vp, struct proc *p, struct ucred *cred, int flag)
401{
402 struct vop_lease_args a;
403 a.a_desc = VDESC(vop_lease);
404 a.a_vp = vp;
405 a.a_p = p;
406 a.a_cred = cred;
407 a.a_flag = flag;
408 return (VCALL(vp, VOFFSET(vop_lease), &a));
409}
410
411struct vop_ioctl_args {
412 struct vnodeop_desc *a_desc;
413 struct vnode *a_vp;
414 u_long a_command;
415 caddr_t a_data;
416 int a_fflag;
417 struct ucred *a_cred;
418 struct proc *a_p;
419};
420extern struct vnodeop_desc vop_ioctl_desc;
421#define VOP_IOCTL(vp, command, data, fflag, cred, p) _VOP_IOCTL(vp, command, data, fflag, cred, p)
422static __inline int _VOP_IOCTL(struct vnode *vp, u_long command, caddr_t data, int fflag, struct ucred *cred, struct proc *p)
423{
424 struct vop_ioctl_args a;
425 a.a_desc = VDESC(vop_ioctl);
426 a.a_vp = vp;
427 a.a_command = command;
428 a.a_data = data;
429 a.a_fflag = fflag;
430 a.a_cred = cred;
431 a.a_p = p;
432 return (VCALL(vp, VOFFSET(vop_ioctl), &a));
433}
434
435struct vop_select_args {
436 struct vnodeop_desc *a_desc;
437 struct vnode *a_vp;
438 int a_which;
439 int a_fflags;
440 struct ucred *a_cred;
441 struct proc *a_p;
442};
443extern struct vnodeop_desc vop_select_desc;
444#define VOP_SELECT(vp, which, fflags, cred, p) _VOP_SELECT(vp, which, fflags, cred, p)
445static __inline int _VOP_SELECT(struct vnode *vp, int which, int fflags, struct ucred *cred, struct proc *p)
446{
447 struct vop_select_args a;
448 a.a_desc = VDESC(vop_select);
449 a.a_vp = vp;
450 a.a_which = which;
451 a.a_fflags = fflags;
452 a.a_cred = cred;
453 a.a_p = p;
454 return (VCALL(vp, VOFFSET(vop_select), &a));
455}
456
457struct vop_exchange_args {
458 struct vnodeop_desc *a_desc;
459 struct vnode *a_fvp;
460 struct vnode *a_tvp;
461 struct ucred *a_cred;
462 struct proc *a_p;
463};
464extern struct vnodeop_desc vop_exchange_desc;
465#define VOP_EXCHANGE(fvp, tvp, cred, p) _VOP_EXCHANGE(fvp, tvp, cred, p)
466static __inline int _VOP_EXCHANGE(struct vnode *fvp, struct vnode *tvp, struct ucred *cred, struct proc *p)
467{
468 struct vop_exchange_args a;
469 a.a_desc = VDESC(vop_exchange);
470 a.a_fvp = fvp;
471 a.a_tvp = tvp;
472 a.a_cred = cred;
473 a.a_p = p;
474 return (VCALL(fvp, VOFFSET(vop_exchange), &a));
475}
476
477struct vop_revoke_args {
478 struct vnodeop_desc *a_desc;
479 struct vnode *a_vp;
480 int a_flags;
481};
482extern struct vnodeop_desc vop_revoke_desc;
483#define VOP_REVOKE(vp, flags) _VOP_REVOKE(vp, flags)
484static __inline int _VOP_REVOKE(struct vnode *vp, int flags)
485{
486 struct vop_revoke_args a;
487 a.a_desc = VDESC(vop_revoke);
488 a.a_vp = vp;
489 a.a_flags = flags;
490 return (VCALL(vp, VOFFSET(vop_revoke), &a));
491}
492
493struct vop_mmap_args {
494 struct vnodeop_desc *a_desc;
495 struct vnode *a_vp;
496 int a_fflags;
497 struct ucred *a_cred;
498 struct proc *a_p;
499};
500extern struct vnodeop_desc vop_mmap_desc;
501#define VOP_MMAP(vp, fflags, cred, p) _VOP_MMAP(vp, fflags, cred, p)
502static __inline int _VOP_MMAP(struct vnode *vp, int fflags, struct ucred *cred, struct proc *p)
503{
504 struct vop_mmap_args a;
505 a.a_desc = VDESC(vop_mmap);
506 a.a_vp = vp;
507 a.a_fflags = fflags;
508 a.a_cred = cred;
509 a.a_p = p;
510 return (VCALL(vp, VOFFSET(vop_mmap), &a));
511}
512
513struct vop_fsync_args {
514 struct vnodeop_desc *a_desc;
515 struct vnode *a_vp;
516 struct ucred *a_cred;
517 int a_waitfor;
518 struct proc *a_p;
519};
520extern struct vnodeop_desc vop_fsync_desc;
521#define VOP_FSYNC(vp, cred, waitfor, p) _VOP_FSYNC(vp, cred, waitfor, p)
522static __inline int _VOP_FSYNC(struct vnode *vp, struct ucred *cred, int waitfor, struct proc *p)
523{
524 struct vop_fsync_args a;
525 a.a_desc = VDESC(vop_fsync);
526 a.a_vp = vp;
527 a.a_cred = cred;
528 a.a_waitfor = waitfor;
529 a.a_p = p;
530 {
531 int _err;
532 extern int ubc_hold();
533 extern void ubc_rele();
534 int _didhold = ubc_hold(vp);
535 _err = VCALL(vp, VOFFSET(vop_fsync), &a);
536 if (_didhold)
537 ubc_rele(vp);
538 return (_err);
539 }
540}
541
542struct vop_seek_args {
543 struct vnodeop_desc *a_desc;
544 struct vnode *a_vp;
545 off_t a_oldoff;
546 off_t a_newoff;
547 struct ucred *a_cred;
548};
549extern struct vnodeop_desc vop_seek_desc;
550#define VOP_SEEK(vp, oldoff, newoff, cred) _VOP_SEEK(vp, oldoff, newoff, cred)
551static __inline int _VOP_SEEK(struct vnode *vp, off_t oldoff, off_t newoff, struct ucred *cred)
552{
553 struct vop_seek_args a;
554 a.a_desc = VDESC(vop_seek);
555 a.a_vp = vp;
556 a.a_oldoff = oldoff;
557 a.a_newoff = newoff;
558 a.a_cred = cred;
559 return (VCALL(vp, VOFFSET(vop_seek), &a));
560}
561
562struct vop_remove_args {
563 struct vnodeop_desc *a_desc;
564 struct vnode *a_dvp;
565 struct vnode *a_vp;
566 struct componentname *a_cnp;
567};
568extern struct vnodeop_desc vop_remove_desc;
569#define VOP_REMOVE(dvp, vp, cnp) _VOP_REMOVE(dvp, vp, cnp)
570static __inline int _VOP_REMOVE(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
571{
572 struct vop_remove_args a;
573 a.a_desc = VDESC(vop_remove);
574 a.a_dvp = dvp;
575 a.a_vp = vp;
576 a.a_cnp = cnp;
577 return (VCALL(dvp, VOFFSET(vop_remove), &a));
578}
579
580struct vop_link_args {
581 struct vnodeop_desc *a_desc;
582 struct vnode *a_vp;
583 struct vnode *a_tdvp;
584 struct componentname *a_cnp;
585};
586extern struct vnodeop_desc vop_link_desc;
587#define VOP_LINK(vp, tdvp, cnp) _VOP_LINK(vp, tdvp, cnp)
588static __inline int _VOP_LINK(struct vnode *vp, struct vnode *tdvp, struct componentname *cnp)
589{
590 struct vop_link_args a;
591 a.a_desc = VDESC(vop_link);
592 a.a_vp = vp;
593 a.a_tdvp = tdvp;
594 a.a_cnp = cnp;
595 return (VCALL(vp, VOFFSET(vop_link), &a));
596}
597
598struct vop_rename_args {
599 struct vnodeop_desc *a_desc;
600 struct vnode *a_fdvp;
601 struct vnode *a_fvp;
602 struct componentname *a_fcnp;
603 struct vnode *a_tdvp;
604 struct vnode *a_tvp;
605 struct componentname *a_tcnp;
606};
607extern struct vnodeop_desc vop_rename_desc;
608#define VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp) _VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp)
609static __inline int _VOP_RENAME(struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp, struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp)
610{
611 struct vop_rename_args a;
612 a.a_desc = VDESC(vop_rename);
613 a.a_fdvp = fdvp;
614 a.a_fvp = fvp;
615 a.a_fcnp = fcnp;
616 a.a_tdvp = tdvp;
617 a.a_tvp = tvp;
618 a.a_tcnp = tcnp;
619 return (VCALL(fdvp, VOFFSET(vop_rename), &a));
620}
621
622struct vop_mkdir_args {
623 struct vnodeop_desc *a_desc;
624 struct vnode *a_dvp;
625 struct vnode **a_vpp;
626 struct componentname *a_cnp;
627 struct vattr *a_vap;
628};
629extern struct vnodeop_desc vop_mkdir_desc;
630#define VOP_MKDIR(dvp, vpp, cnp, vap) _VOP_MKDIR(dvp, vpp, cnp, vap)
631static __inline int _VOP_MKDIR(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
632{
633 struct vop_mkdir_args a;
634 a.a_desc = VDESC(vop_mkdir);
635 a.a_dvp = dvp;
636 a.a_vpp = vpp;
637 a.a_cnp = cnp;
638 a.a_vap = vap;
639 return (VCALL(dvp, VOFFSET(vop_mkdir), &a));
640}
641
642struct vop_rmdir_args {
643 struct vnodeop_desc *a_desc;
644 struct vnode *a_dvp;
645 struct vnode *a_vp;
646 struct componentname *a_cnp;
647};
648extern struct vnodeop_desc vop_rmdir_desc;
649#define VOP_RMDIR(dvp, vp, cnp) _VOP_RMDIR(dvp, vp, cnp)
650static __inline int _VOP_RMDIR(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
651{
652 struct vop_rmdir_args a;
653 a.a_desc = VDESC(vop_rmdir);
654 a.a_dvp = dvp;
655 a.a_vp = vp;
656 a.a_cnp = cnp;
657 return (VCALL(dvp, VOFFSET(vop_rmdir), &a));
658}
659
660struct vop_symlink_args {
661 struct vnodeop_desc *a_desc;
662 struct vnode *a_dvp;
663 struct vnode **a_vpp;
664 struct componentname *a_cnp;
665 struct vattr *a_vap;
666 char *a_target;
667};
668extern struct vnodeop_desc vop_symlink_desc;
669#define VOP_SYMLINK(dvp, vpp, cnp, vap, target) _VOP_SYMLINK(dvp, vpp, cnp, vap, target)
670static __inline int _VOP_SYMLINK(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap, char *target)
671{
672 struct vop_symlink_args a;
673 a.a_desc = VDESC(vop_symlink);
674 a.a_dvp = dvp;
675 a.a_vpp = vpp;
676 a.a_cnp = cnp;
677 a.a_vap = vap;
678 a.a_target = target;
679 return (VCALL(dvp, VOFFSET(vop_symlink), &a));
680}
681
682struct vop_readdir_args {
683 struct vnodeop_desc *a_desc;
684 struct vnode *a_vp;
685 struct uio *a_uio;
686 struct ucred *a_cred;
687 int *a_eofflag;
688 int *a_ncookies;
689 u_long **a_cookies;
690};
691extern struct vnodeop_desc vop_readdir_desc;
692#define VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies) _VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies)
693static __inline int _VOP_READDIR(struct vnode *vp, struct uio *uio, struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies)
694{
695 struct vop_readdir_args a;
696 a.a_desc = VDESC(vop_readdir);
697 a.a_vp = vp;
698 a.a_uio = uio;
699 a.a_cred = cred;
700 a.a_eofflag = eofflag;
701 a.a_ncookies = ncookies;
702 a.a_cookies = cookies;
703 return (VCALL(vp, VOFFSET(vop_readdir), &a));
704}
705
706struct vop_readdirattr_args {
707 struct vnodeop_desc *a_desc;
708 struct vnode *a_vp;
709 struct attrlist *a_alist;
710 struct uio *a_uio;
711 u_long a_maxcount;
712 u_long a_options;
713 u_long *a_newstate;
714 int *a_eofflag;
715 u_long *a_actualcount;
716 u_long **a_cookies;
717 struct ucred *a_cred;
718};
719extern struct vnodeop_desc vop_readdirattr_desc;
720#define VOP_READDIRATTR(vp, alist, uio, maxcount, options, newstate, eofflag, actualcount, cookies, cred) _VOP_READDIRATTR(vp, alist, uio, maxcount, options, newstate, eofflag, actualcount, cookies, cred)
721static __inline int _VOP_READDIRATTR(struct vnode *vp, struct attrlist *alist, struct uio *uio, u_long maxcount, u_long options, u_long *newstate, int *eofflag, u_long *actualcount, u_long **cookies, struct ucred *cred)
722{
723 struct vop_readdirattr_args a;
724 a.a_desc = VDESC(vop_readdirattr);
725 a.a_vp = vp;
726 a.a_alist = alist;
727 a.a_uio = uio;
728 a.a_maxcount = maxcount;
729 a.a_options = options;
730 a.a_newstate = newstate;
731 a.a_eofflag = eofflag;
732 a.a_actualcount = actualcount;
733 a.a_cookies = cookies;
734 a.a_cred = cred;
735 return (VCALL(vp, VOFFSET(vop_readdirattr), &a));
736}
737
738struct vop_readlink_args {
739 struct vnodeop_desc *a_desc;
740 struct vnode *a_vp;
741 struct uio *a_uio;
742 struct ucred *a_cred;
743};
744extern struct vnodeop_desc vop_readlink_desc;
745#define VOP_READLINK(vp, uio, cred) _VOP_READLINK(vp, uio, cred)
746static __inline int _VOP_READLINK(struct vnode *vp, struct uio *uio, struct ucred *cred)
747{
748 struct vop_readlink_args a;
749 a.a_desc = VDESC(vop_readlink);
750 a.a_vp = vp;
751 a.a_uio = uio;
752 a.a_cred = cred;
753 return (VCALL(vp, VOFFSET(vop_readlink), &a));
754}
755
756struct vop_abortop_args {
757 struct vnodeop_desc *a_desc;
758 struct vnode *a_dvp;
759 struct componentname *a_cnp;
760};
761extern struct vnodeop_desc vop_abortop_desc;
762#define VOP_ABORTOP(dvp, cnp) _VOP_ABORTOP(dvp, cnp)
763static __inline int _VOP_ABORTOP(struct vnode *dvp, struct componentname *cnp)
764{
765 struct vop_abortop_args a;
766 a.a_desc = VDESC(vop_abortop);
767 a.a_dvp = dvp;
768 a.a_cnp = cnp;
769 return (VCALL(dvp, VOFFSET(vop_abortop), &a));
770}
771
772struct vop_inactive_args {
773 struct vnodeop_desc *a_desc;
774 struct vnode *a_vp;
775 struct proc *a_p;
776};
777extern struct vnodeop_desc vop_inactive_desc;
778#define VOP_INACTIVE(vp, p) _VOP_INACTIVE(vp, p)
779static __inline int _VOP_INACTIVE(struct vnode *vp, struct proc *p)
780{
781 struct vop_inactive_args a;
782 a.a_desc = VDESC(vop_inactive);
783 a.a_vp = vp;
784 a.a_p = p;
785 return (VCALL(vp, VOFFSET(vop_inactive), &a));
786}
787
788struct vop_reclaim_args {
789 struct vnodeop_desc *a_desc;
790 struct vnode *a_vp;
791 struct proc *a_p;
792};
793extern struct vnodeop_desc vop_reclaim_desc;
794#define VOP_RECLAIM(vp, p) _VOP_RECLAIM(vp, p)
795static __inline int _VOP_RECLAIM(struct vnode *vp, struct proc *p)
796{
797 struct vop_reclaim_args a;
798 a.a_desc = VDESC(vop_reclaim);
799 a.a_vp = vp;
800 a.a_p = p;
801 return (VCALL(vp, VOFFSET(vop_reclaim), &a));
802}
803
804struct vop_lock_args {
805 struct vnodeop_desc *a_desc;
806 struct vnode *a_vp;
807 int a_flags;
808 struct proc *a_p;
809};
810extern struct vnodeop_desc vop_lock_desc;
811#define VOP_LOCK(vp, flags, p) _VOP_LOCK(vp, flags, p)
812static __inline int _VOP_LOCK(struct vnode *vp, int flags, struct proc *p)
813{
814 struct vop_lock_args a;
815 a.a_desc = VDESC(vop_lock);
816 a.a_vp = vp;
817 a.a_flags = flags;
818 a.a_p = p;
819 return (VCALL(vp, VOFFSET(vop_lock), &a));
820}
821
822struct vop_unlock_args {
823 struct vnodeop_desc *a_desc;
824 struct vnode *a_vp;
825 int a_flags;
826 struct proc *a_p;
827};
828extern struct vnodeop_desc vop_unlock_desc;
829#define VOP_UNLOCK(vp, flags, p) _VOP_UNLOCK(vp, flags, p)
830static __inline int _VOP_UNLOCK(struct vnode *vp, int flags, struct proc *p)
831{
832 struct vop_unlock_args a;
833 a.a_desc = VDESC(vop_unlock);
834 a.a_vp = vp;
835 a.a_flags = flags;
836 a.a_p = p;
837 return (VCALL(vp, VOFFSET(vop_unlock), &a));
838}
839
840struct vop_bmap_args {
841 struct vnodeop_desc *a_desc;
842 struct vnode *a_vp;
843 daddr_t a_bn;
844 struct vnode **a_vpp;
845 daddr_t *a_bnp;
846 int *a_runp;
847};
848extern struct vnodeop_desc vop_bmap_desc;
849#define VOP_BMAP(vp, bn, vpp, bnp, runp) _VOP_BMAP(vp, bn, vpp, bnp, runp)
850static __inline int _VOP_BMAP(struct vnode *vp, daddr_t bn, struct vnode **vpp, daddr_t *bnp, int *runp)
851{
852 struct vop_bmap_args a;
853 a.a_desc = VDESC(vop_bmap);
854 a.a_vp = vp;
855 a.a_bn = bn;
856 a.a_vpp = vpp;
857 a.a_bnp = bnp;
858 a.a_runp = runp;
859 return (VCALL(vp, VOFFSET(vop_bmap), &a));
860}
861
862struct vop_print_args {
863 struct vnodeop_desc *a_desc;
864 struct vnode *a_vp;
865};
866extern struct vnodeop_desc vop_print_desc;
867#define VOP_PRINT(vp) _VOP_PRINT(vp)
868static __inline int _VOP_PRINT(struct vnode *vp)
869{
870 struct vop_print_args a;
871 a.a_desc = VDESC(vop_print);
872 a.a_vp = vp;
873 return (VCALL(vp, VOFFSET(vop_print), &a));
874}
875
876struct vop_islocked_args {
877 struct vnodeop_desc *a_desc;
878 struct vnode *a_vp;
879};
880extern struct vnodeop_desc vop_islocked_desc;
881#define VOP_ISLOCKED(vp) _VOP_ISLOCKED(vp)
882static __inline int _VOP_ISLOCKED(struct vnode *vp)
883{
884 struct vop_islocked_args a;
885 a.a_desc = VDESC(vop_islocked);
886 a.a_vp = vp;
887 return (VCALL(vp, VOFFSET(vop_islocked), &a));
888}
889
890struct vop_pathconf_args {
891 struct vnodeop_desc *a_desc;
892 struct vnode *a_vp;
893 int a_name;
894 register_t *a_retval;
895};
896extern struct vnodeop_desc vop_pathconf_desc;
897#define VOP_PATHCONF(vp, name, retval) _VOP_PATHCONF(vp, name, retval)
898static __inline int _VOP_PATHCONF(struct vnode *vp, int name, register_t *retval)
899{
900 struct vop_pathconf_args a;
901 a.a_desc = VDESC(vop_pathconf);
902 a.a_vp = vp;
903 a.a_name = name;
904 a.a_retval = retval;
905 return (VCALL(vp, VOFFSET(vop_pathconf), &a));
906}
907
908struct vop_advlock_args {
909 struct vnodeop_desc *a_desc;
910 struct vnode *a_vp;
911 caddr_t a_id;
912 int a_op;
913 struct flock *a_fl;
914 int a_flags;
915};
916extern struct vnodeop_desc vop_advlock_desc;
917#define VOP_ADVLOCK(vp, id, op, fl, flags) _VOP_ADVLOCK(vp, id, op, fl, flags)
918static __inline int _VOP_ADVLOCK(struct vnode *vp, caddr_t id, int op, struct flock *fl, int flags)
919{
920 struct vop_advlock_args a;
921 a.a_desc = VDESC(vop_advlock);
922 a.a_vp = vp;
923 a.a_id = id;
924 a.a_op = op;
925 a.a_fl = fl;
926 a.a_flags = flags;
927 return (VCALL(vp, VOFFSET(vop_advlock), &a));
928}
929
930struct vop_blkatoff_args {
931 struct vnodeop_desc *a_desc;
932 struct vnode *a_vp;
933 off_t a_offset;
934 char **a_res;
935 struct buf **a_bpp;
936};
937extern struct vnodeop_desc vop_blkatoff_desc;
938#define VOP_BLKATOFF(vp, offset, res, bpp) _VOP_BLKATOFF(vp, offset, res, bpp)
939static __inline int _VOP_BLKATOFF(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
940{
941 struct vop_blkatoff_args a;
942 a.a_desc = VDESC(vop_blkatoff);
943 a.a_vp = vp;
944 a.a_offset = offset;
945 a.a_res = res;
946 a.a_bpp = bpp;
947 return (VCALL(vp, VOFFSET(vop_blkatoff), &a));
948}
949
950struct vop_valloc_args {
951 struct vnodeop_desc *a_desc;
952 struct vnode *a_pvp;
953 int a_mode;
954 struct ucred *a_cred;
955 struct vnode **a_vpp;
956};
957extern struct vnodeop_desc vop_valloc_desc;
958#define VOP_VALLOC(pvp, mode, cred, vpp) _VOP_VALLOC(pvp, mode, cred, vpp)
959static __inline int _VOP_VALLOC(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp)
960{
961 struct vop_valloc_args a;
962 a.a_desc = VDESC(vop_valloc);
963 a.a_pvp = pvp;
964 a.a_mode = mode;
965 a.a_cred = cred;
966 a.a_vpp = vpp;
967 return (VCALL(pvp, VOFFSET(vop_valloc), &a));
968}
969
970struct vop_reallocblks_args {
971 struct vnodeop_desc *a_desc;
972 struct vnode *a_vp;
973 struct cluster_save *a_buflist;
974};
975extern struct vnodeop_desc vop_reallocblks_desc;
976#define VOP_REALLOCBLKS(vp, buflist) _VOP_REALLOCBLKS(vp, buflist)
977static __inline int _VOP_REALLOCBLKS(struct vnode *vp, struct cluster_save *buflist)
978{
979 struct vop_reallocblks_args a;
980 a.a_desc = VDESC(vop_reallocblks);
981 a.a_vp = vp;
982 a.a_buflist = buflist;
983 return (VCALL(vp, VOFFSET(vop_reallocblks), &a));
984}
985
986struct vop_vfree_args {
987 struct vnodeop_desc *a_desc;
988 struct vnode *a_pvp;
989 ino_t a_ino;
990 int a_mode;
991};
992extern struct vnodeop_desc vop_vfree_desc;
993#define VOP_VFREE(pvp, ino, mode) _VOP_VFREE(pvp, ino, mode)
994static __inline int _VOP_VFREE(struct vnode *pvp, ino_t ino, int mode)
995{
996 struct vop_vfree_args a;
997 a.a_desc = VDESC(vop_vfree);
998 a.a_pvp = pvp;
999 a.a_ino = ino;
1000 a.a_mode = mode;
1001 return (VCALL(pvp, VOFFSET(vop_vfree), &a));
1002}
1003
1004struct vop_truncate_args {
1005 struct vnodeop_desc *a_desc;
1006 struct vnode *a_vp;
1007 off_t a_length;
1008 int a_flags;
1009 struct ucred *a_cred;
1010 struct proc *a_p;
1011};
1012extern struct vnodeop_desc vop_truncate_desc;
1013#define VOP_TRUNCATE(vp, length, flags, cred, p) _VOP_TRUNCATE(vp, length, flags, cred, p)
1014static __inline int _VOP_TRUNCATE(struct vnode *vp, off_t length, int flags, struct ucred *cred, struct proc *p)
1015{
1016 struct vop_truncate_args a;
1017 a.a_desc = VDESC(vop_truncate);
1018 a.a_vp = vp;
1019 a.a_length = length;
1020 a.a_flags = flags;
1021 a.a_cred = cred;
1022 a.a_p = p;
1023 {
1024 int _err;
1025 extern int ubc_hold();
1026 extern void ubc_rele();
1027 int _didhold = ubc_hold(vp);
1028 _err = VCALL(vp, VOFFSET(vop_truncate), &a);
1029 if (_didhold)
1030 ubc_rele(vp);
1031 return (_err);
1032 }
1033}
1034
1035struct vop_allocate_args {
1036 struct vnodeop_desc *a_desc;
1037 struct vnode *a_vp;
1038 off_t a_length;
1039 u_int32_t a_flags;
1040 off_t *a_bytesallocated;
1041 struct ucred *a_cred;
1042 struct proc *a_p;
1043};
1044extern struct vnodeop_desc vop_allocate_desc;
1045#define VOP_ALLOCATE(vp, length, flags, bytesallocated, cred, p) _VOP_ALLOCATE(vp, length, flags, bytesallocated, cred, p)
1046static __inline int _VOP_ALLOCATE(struct vnode *vp, off_t length, u_int32_t flags, off_t *bytesallocated, struct ucred *cred, struct proc *p)
1047{
1048 struct vop_allocate_args a;
1049 a.a_desc = VDESC(vop_allocate);
1050 a.a_vp = vp;
1051 a.a_length = length;
1052 a.a_flags = flags;
1053 a.a_bytesallocated = bytesallocated;
1054 a.a_cred = cred;
1055 a.a_p = p;
1056 return (VCALL(vp, VOFFSET(vop_allocate), &a));
1057}
1058
1059struct vop_update_args {
1060 struct vnodeop_desc *a_desc;
1061 struct vnode *a_vp;
1062 struct timeval *a_access;
1063 struct timeval *a_modify;
1064 int a_waitfor;
1065};
1066extern struct vnodeop_desc vop_update_desc;
1067#define VOP_UPDATE(vp, access, modify, waitfor) _VOP_UPDATE(vp, access, modify, waitfor)
1068static __inline int _VOP_UPDATE(struct vnode *vp, struct timeval *access, struct timeval *modify, int waitfor)
1069{
1070 struct vop_update_args a;
1071 a.a_desc = VDESC(vop_update);
1072 a.a_vp = vp;
1073 a.a_access = access;
1074 a.a_modify = modify;
1075 a.a_waitfor = waitfor;
1076 return (VCALL(vp, VOFFSET(vop_update), &a));
1077}
1078
1079struct vop_pgrd_args {
1080 struct vnodeop_desc *a_desc;
1081 struct vnode *a_vp;
1082 struct uio *a_uio;
1083 struct ucred *a_cred;
1084};
1085extern struct vnodeop_desc vop_pgrd_desc;
1086#define VOP_PGRD(vp, uio, cred) _VOP_PGRD(vp, uio, cred)
1087static __inline int _VOP_PGRD(struct vnode *vp, struct uio *uio, struct ucred *cred)
1088{
1089 struct vop_pgrd_args a;
1090 a.a_desc = VDESC(vop_pgrd);
1091 a.a_vp = vp;
1092 a.a_uio = uio;
1093 a.a_cred = cred;
1094 return (VCALL(vp, VOFFSET(vop_pgrd), &a));
1095}
1096
1097struct vop_pgwr_args {
1098 struct vnodeop_desc *a_desc;
1099 struct vnode *a_vp;
1100 struct uio *a_uio;
1101 struct ucred *a_cred;
1102 vm_offset_t a_offset;
1103};
1104extern struct vnodeop_desc vop_pgwr_desc;
1105#define VOP_PGWR(vp, uio, cred, offset) _VOP_PGWR(vp, uio, cred, offset)
1106static __inline int _VOP_PGWR(struct vnode *vp, struct uio *uio, struct ucred *cred, vm_offset_t offset)
1107{
1108 struct vop_pgwr_args a;
1109 a.a_desc = VDESC(vop_pgwr);
1110 a.a_vp = vp;
1111 a.a_uio = uio;
1112 a.a_cred = cred;
1113 a.a_offset = offset;
1114 return (VCALL(vp, VOFFSET(vop_pgwr), &a));
1115}
1116
1117struct vop_pagein_args {
1118 struct vnodeop_desc *a_desc;
1119 struct vnode *a_vp;
1120 upl_t a_pl;
1121 vm_offset_t a_pl_offset;
1122 off_t a_f_offset;
1123 size_t a_size;
1124 struct ucred *a_cred;
1125 int a_flags;
1126};
1127extern struct vnodeop_desc vop_pagein_desc;
1128#define VOP_PAGEIN(vp, pl, pl_offset, f_offset, size, cred, flags) _VOP_PAGEIN(vp, pl, pl_offset, f_offset, size, cred, flags)
1129static __inline int _VOP_PAGEIN(struct vnode *vp, upl_t pl, vm_offset_t pl_offset, off_t f_offset, size_t size, struct ucred *cred, int flags)
1130{
1131 struct vop_pagein_args a;
1132 a.a_desc = VDESC(vop_pagein);
1133 a.a_vp = vp;
1134 a.a_pl = pl;
1135 a.a_pl_offset = pl_offset;
1136 a.a_f_offset = f_offset;
1137 a.a_size = size;
1138 a.a_cred = cred;
1139 a.a_flags = flags;
1140 return (VCALL(vp, VOFFSET(vop_pagein), &a));
1141}
1142
1143struct vop_pageout_args {
1144 struct vnodeop_desc *a_desc;
1145 struct vnode *a_vp;
1146 upl_t a_pl;
1147 vm_offset_t a_pl_offset;
1148 off_t a_f_offset;
1149 size_t a_size;
1150 struct ucred *a_cred;
1151 int a_flags;
1152};
1153extern struct vnodeop_desc vop_pageout_desc;
1154#define VOP_PAGEOUT(vp, pl, pl_offset, f_offset, size, cred, flags) _VOP_PAGEOUT(vp, pl, pl_offset, f_offset, size, cred, flags)
1155static __inline int _VOP_PAGEOUT(struct vnode *vp, upl_t pl, vm_offset_t pl_offset, off_t f_offset, size_t size, struct ucred *cred, int flags)
1156{
1157 struct vop_pageout_args a;
1158 a.a_desc = VDESC(vop_pageout);
1159 a.a_vp = vp;
1160 a.a_pl = pl;
1161 a.a_pl_offset = pl_offset;
1162 a.a_f_offset = f_offset;
1163 a.a_size = size;
1164 a.a_cred = cred;
1165 a.a_flags = flags;
1166 return (VCALL(vp, VOFFSET(vop_pageout), &a));
1167}
1168
1169struct vop_devblocksize_args {
1170 struct vnodeop_desc *a_desc;
1171 struct vnode *a_vp;
1172 register_t *a_retval;
1173};
1174extern struct vnodeop_desc vop_devblocksize_desc;
1175#define VOP_DEVBLOCKSIZE(vp, retval) _VOP_DEVBLOCKSIZE(vp, retval)
1176static __inline int _VOP_DEVBLOCKSIZE(struct vnode *vp, register_t *retval)
1177{
1178 struct vop_devblocksize_args a;
1179 a.a_desc = VDESC(vop_devblocksize);
1180 a.a_vp = vp;
1181 a.a_retval = retval;
1182 return (VCALL(vp, VOFFSET(vop_devblocksize), &a));
1183}
1184
1185struct vop_searchfs_args {
1186 struct vnodeop_desc *a_desc;
1187 struct vnode *a_vp;
1188 void *a_searchparams1;
1189 void *a_searchparams2;
1190 struct attrlist *a_searchattrs;
1191 u_long a_maxmatches;
1192 struct timeval *a_timelimit;
1193 struct attrlist *a_returnattrs;
1194 u_long *a_nummatches;
1195 u_long a_scriptcode;
1196 u_long a_options;
1197 struct uio *a_uio;
1198 struct searchstate *a_searchstate;
1199};
1200extern struct vnodeop_desc vop_searchfs_desc;
1201#define VOP_SEARCHFS(vp, searchparams1, searchparams2, searchattrs, maxmatches, timelimit, returnattrs, nummatches, scriptcode, options, uio, searchstate) _VOP_SEARCHFS(vp, searchparams1, searchparams2, searchattrs, maxmatches, timelimit, returnattrs, nummatches, scriptcode, options, uio, searchstate)
1202static __inline int _VOP_SEARCHFS(struct vnode *vp, void *searchparams1, void *searchparams2, struct attrlist *searchattrs, u_long maxmatches, struct timeval *timelimit, struct attrlist *returnattrs, u_long *nummatches, u_long scriptcode, u_long options, struct uio *uio, struct searchstate *searchstate)
1203{
1204 struct vop_searchfs_args a;
1205 a.a_desc = VDESC(vop_searchfs);
1206 a.a_vp = vp;
1207 a.a_searchparams1 = searchparams1;
1208 a.a_searchparams2 = searchparams2;
1209 a.a_searchattrs = searchattrs;
1210 a.a_maxmatches = maxmatches;
1211 a.a_timelimit = timelimit;
1212 a.a_returnattrs = returnattrs;
1213 a.a_nummatches = nummatches;
1214 a.a_scriptcode = scriptcode;
1215 a.a_options = options;
1216 a.a_uio = uio;
1217 a.a_searchstate = searchstate;
1218 return (VCALL(vp, VOFFSET(vop_searchfs), &a));
1219}
1220
1221struct vop_copyfile_args {
1222 struct vnodeop_desc *a_desc;
1223 struct vnode *a_fvp;
1224 struct vnode *a_tdvp;
1225 struct vnode *a_tvp;
1226 struct componentname *a_tcnp;
1227 int a_mode;
1228 int a_flags;
1229};
1230extern struct vnodeop_desc vop_copyfile_desc;
1231#define VOP_COPYFILE(fvp, tdvp, tvp, tcnp, mode, flags) _VOP_COPYFILE(fvp, tdvp, tvp, tcnp, mode, flags)
1232static __inline int _VOP_COPYFILE(struct vnode *fvp, struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp, int mode, int flags)
1233{
1234 struct vop_copyfile_args a;
1235 a.a_desc = VDESC(vop_copyfile);
1236 a.a_fvp = fvp;
1237 a.a_tdvp = tdvp;
1238 a.a_tvp = tvp;
1239 a.a_tcnp = tcnp;
1240 a.a_mode = mode;
1241 a.a_flags = flags;
1242 return (VCALL(fvp, VOFFSET(vop_copyfile), &a));
1243}
1244
1245struct vop_blktooff_args {
1246 struct vnodeop_desc *a_desc;
1247 struct vnode *a_vp;
1248 daddr_t a_lblkno;
1249 off_t *a_offset;
1250};
1251extern struct vnodeop_desc vop_blktooff_desc;
1252#define VOP_BLKTOOFF(vp, lblkno, offset) _VOP_BLKTOOFF(vp, lblkno, offset)
1253static __inline int _VOP_BLKTOOFF(struct vnode *vp, daddr_t lblkno, off_t *offset)
1254{
1255 struct vop_blktooff_args a;
1256 a.a_desc = VDESC(vop_blktooff);
1257 a.a_vp = vp;
1258 a.a_lblkno = lblkno;
1259 a.a_offset = offset;
1260 return (VCALL(vp, VOFFSET(vop_blktooff), &a));
1261}
1262
1263struct vop_offtoblk_args {
1264 struct vnodeop_desc *a_desc;
1265 struct vnode *a_vp;
1266 off_t a_offset;
1267 daddr_t *a_lblkno;
1268};
1269extern struct vnodeop_desc vop_offtoblk_desc;
1270#define VOP_OFFTOBLK(vp, offset, lblkno) _VOP_OFFTOBLK(vp, offset, lblkno)
1271static __inline int _VOP_OFFTOBLK(struct vnode *vp, off_t offset, daddr_t *lblkno)
1272{
1273 struct vop_offtoblk_args a;
1274 a.a_desc = VDESC(vop_offtoblk);
1275 a.a_vp = vp;
1276 a.a_offset = offset;
1277 a.a_lblkno = lblkno;
1278 return (VCALL(vp, VOFFSET(vop_offtoblk), &a));
1279}
1280
1281struct vop_cmap_args {
1282 struct vnodeop_desc *a_desc;
1283 struct vnode *a_vp;
1284 off_t a_foffset;
1285 size_t a_size;
1286 daddr_t *a_bpn;
1287 size_t *a_run;
1288 void *a_poff;
1289};
1290extern struct vnodeop_desc vop_cmap_desc;
1291#define VOP_CMAP(vp, foffset, size, bpn, run, poff) _VOP_CMAP(vp, foffset, size, bpn, run, poff)
1292static __inline int _VOP_CMAP(struct vnode *vp, off_t foffset, size_t size, daddr_t *bpn, size_t *run, void *poff)
1293{
1294 struct vop_cmap_args a;
1295 a.a_desc = VDESC(vop_cmap);
1296 a.a_vp = vp;
1297 a.a_foffset = foffset;
1298 a.a_size = size;
1299 a.a_bpn = bpn;
1300 a.a_run = run;
1301 a.a_poff = poff;
1302 return (VCALL(vp, VOFFSET(vop_cmap), &a));
1303}
1304
1305/* Special cases: */
1306#include <sys/buf.h>
1307#include <sys/vm.h>
1308
1309struct vop_strategy_args {
1310 struct vnodeop_desc *a_desc;
1311 struct buf *a_bp;
1312};
1313extern struct vnodeop_desc vop_strategy_desc;
1314#define VOP_STRATEGY(bp) _VOP_STRATEGY(bp)
1315static __inline int _VOP_STRATEGY(struct buf *bp)
1316{
1317 struct vop_strategy_args a;
1318 a.a_desc = VDESC(vop_strategy);
1319 a.a_bp = bp;
1320 return (VCALL(bp->b_vp, VOFFSET(vop_strategy), &a));
1321}
1322
1323struct vop_bwrite_args {
1324 struct vnodeop_desc *a_desc;
1325 struct buf *a_bp;
1326};
1327extern struct vnodeop_desc vop_bwrite_desc;
1328#define VOP_BWRITE(bp) _VOP_BWRITE(bp)
1329static __inline int _VOP_BWRITE(struct buf *bp)
1330{
1331 struct vop_bwrite_args a;
1332 a.a_desc = VDESC(vop_bwrite);
1333 a.a_bp = bp;
1334 return (VCALL(bp->b_vp, VOFFSET(vop_bwrite), &a));
1335}
1336
1337/* End of special cases. */
1338
1339#endif /* !_VNODE_IF_H_ */