]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/vnode_if.h
xnu-201.19.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)
0b4e3aa0 357 ubc_rele(vp);
1c79356b
A
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)
0b4e3aa0 386 ubc_rele(vp);
1c79356b
A
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;
0b4e3aa0 441 void * a_wql;
1c79356b
A
442 struct proc *a_p;
443};
444extern struct vnodeop_desc vop_select_desc;
0b4e3aa0
A
445#define VOP_SELECT(vp, which, fflags, cred, wql, p) _VOP_SELECT(vp, which, fflags, cred, wql, p)
446static __inline int _VOP_SELECT(struct vnode *vp, int which, int fflags, struct ucred *cred, void * wql, struct proc *p)
1c79356b
A
447{
448 struct vop_select_args a;
449 a.a_desc = VDESC(vop_select);
450 a.a_vp = vp;
451 a.a_which = which;
452 a.a_fflags = fflags;
453 a.a_cred = cred;
0b4e3aa0 454 a.a_wql = wql;
1c79356b
A
455 a.a_p = p;
456 return (VCALL(vp, VOFFSET(vop_select), &a));
457}
458
459struct vop_exchange_args {
460 struct vnodeop_desc *a_desc;
461 struct vnode *a_fvp;
462 struct vnode *a_tvp;
463 struct ucred *a_cred;
464 struct proc *a_p;
465};
466extern struct vnodeop_desc vop_exchange_desc;
467#define VOP_EXCHANGE(fvp, tvp, cred, p) _VOP_EXCHANGE(fvp, tvp, cred, p)
468static __inline int _VOP_EXCHANGE(struct vnode *fvp, struct vnode *tvp, struct ucred *cred, struct proc *p)
469{
470 struct vop_exchange_args a;
471 a.a_desc = VDESC(vop_exchange);
472 a.a_fvp = fvp;
473 a.a_tvp = tvp;
474 a.a_cred = cred;
475 a.a_p = p;
476 return (VCALL(fvp, VOFFSET(vop_exchange), &a));
477}
478
479struct vop_revoke_args {
480 struct vnodeop_desc *a_desc;
481 struct vnode *a_vp;
482 int a_flags;
483};
484extern struct vnodeop_desc vop_revoke_desc;
485#define VOP_REVOKE(vp, flags) _VOP_REVOKE(vp, flags)
486static __inline int _VOP_REVOKE(struct vnode *vp, int flags)
487{
488 struct vop_revoke_args a;
489 a.a_desc = VDESC(vop_revoke);
490 a.a_vp = vp;
491 a.a_flags = flags;
492 return (VCALL(vp, VOFFSET(vop_revoke), &a));
493}
494
495struct vop_mmap_args {
496 struct vnodeop_desc *a_desc;
497 struct vnode *a_vp;
498 int a_fflags;
499 struct ucred *a_cred;
500 struct proc *a_p;
501};
502extern struct vnodeop_desc vop_mmap_desc;
503#define VOP_MMAP(vp, fflags, cred, p) _VOP_MMAP(vp, fflags, cred, p)
504static __inline int _VOP_MMAP(struct vnode *vp, int fflags, struct ucred *cred, struct proc *p)
505{
506 struct vop_mmap_args a;
507 a.a_desc = VDESC(vop_mmap);
508 a.a_vp = vp;
509 a.a_fflags = fflags;
510 a.a_cred = cred;
511 a.a_p = p;
512 return (VCALL(vp, VOFFSET(vop_mmap), &a));
513}
514
515struct vop_fsync_args {
516 struct vnodeop_desc *a_desc;
517 struct vnode *a_vp;
518 struct ucred *a_cred;
519 int a_waitfor;
520 struct proc *a_p;
521};
522extern struct vnodeop_desc vop_fsync_desc;
523#define VOP_FSYNC(vp, cred, waitfor, p) _VOP_FSYNC(vp, cred, waitfor, p)
524static __inline int _VOP_FSYNC(struct vnode *vp, struct ucred *cred, int waitfor, struct proc *p)
525{
526 struct vop_fsync_args a;
527 a.a_desc = VDESC(vop_fsync);
528 a.a_vp = vp;
529 a.a_cred = cred;
530 a.a_waitfor = waitfor;
531 a.a_p = p;
532 {
533 int _err;
534 extern int ubc_hold();
535 extern void ubc_rele();
536 int _didhold = ubc_hold(vp);
537 _err = VCALL(vp, VOFFSET(vop_fsync), &a);
538 if (_didhold)
0b4e3aa0 539 ubc_rele(vp);
1c79356b
A
540 return (_err);
541 }
542}
543
544struct vop_seek_args {
545 struct vnodeop_desc *a_desc;
546 struct vnode *a_vp;
547 off_t a_oldoff;
548 off_t a_newoff;
549 struct ucred *a_cred;
550};
551extern struct vnodeop_desc vop_seek_desc;
552#define VOP_SEEK(vp, oldoff, newoff, cred) _VOP_SEEK(vp, oldoff, newoff, cred)
553static __inline int _VOP_SEEK(struct vnode *vp, off_t oldoff, off_t newoff, struct ucred *cred)
554{
555 struct vop_seek_args a;
556 a.a_desc = VDESC(vop_seek);
557 a.a_vp = vp;
558 a.a_oldoff = oldoff;
559 a.a_newoff = newoff;
560 a.a_cred = cred;
561 return (VCALL(vp, VOFFSET(vop_seek), &a));
562}
563
564struct vop_remove_args {
565 struct vnodeop_desc *a_desc;
566 struct vnode *a_dvp;
567 struct vnode *a_vp;
568 struct componentname *a_cnp;
569};
570extern struct vnodeop_desc vop_remove_desc;
571#define VOP_REMOVE(dvp, vp, cnp) _VOP_REMOVE(dvp, vp, cnp)
572static __inline int _VOP_REMOVE(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
573{
574 struct vop_remove_args a;
575 a.a_desc = VDESC(vop_remove);
576 a.a_dvp = dvp;
577 a.a_vp = vp;
578 a.a_cnp = cnp;
579 return (VCALL(dvp, VOFFSET(vop_remove), &a));
580}
581
582struct vop_link_args {
583 struct vnodeop_desc *a_desc;
584 struct vnode *a_vp;
585 struct vnode *a_tdvp;
586 struct componentname *a_cnp;
587};
588extern struct vnodeop_desc vop_link_desc;
589#define VOP_LINK(vp, tdvp, cnp) _VOP_LINK(vp, tdvp, cnp)
590static __inline int _VOP_LINK(struct vnode *vp, struct vnode *tdvp, struct componentname *cnp)
591{
592 struct vop_link_args a;
593 a.a_desc = VDESC(vop_link);
594 a.a_vp = vp;
595 a.a_tdvp = tdvp;
596 a.a_cnp = cnp;
597 return (VCALL(vp, VOFFSET(vop_link), &a));
598}
599
600struct vop_rename_args {
601 struct vnodeop_desc *a_desc;
602 struct vnode *a_fdvp;
603 struct vnode *a_fvp;
604 struct componentname *a_fcnp;
605 struct vnode *a_tdvp;
606 struct vnode *a_tvp;
607 struct componentname *a_tcnp;
608};
609extern struct vnodeop_desc vop_rename_desc;
610#define VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp) _VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp)
611static __inline int _VOP_RENAME(struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp, struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp)
612{
613 struct vop_rename_args a;
614 a.a_desc = VDESC(vop_rename);
615 a.a_fdvp = fdvp;
616 a.a_fvp = fvp;
617 a.a_fcnp = fcnp;
618 a.a_tdvp = tdvp;
619 a.a_tvp = tvp;
620 a.a_tcnp = tcnp;
621 return (VCALL(fdvp, VOFFSET(vop_rename), &a));
622}
623
624struct vop_mkdir_args {
625 struct vnodeop_desc *a_desc;
626 struct vnode *a_dvp;
627 struct vnode **a_vpp;
628 struct componentname *a_cnp;
629 struct vattr *a_vap;
630};
631extern struct vnodeop_desc vop_mkdir_desc;
632#define VOP_MKDIR(dvp, vpp, cnp, vap) _VOP_MKDIR(dvp, vpp, cnp, vap)
633static __inline int _VOP_MKDIR(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
634{
635 struct vop_mkdir_args a;
636 a.a_desc = VDESC(vop_mkdir);
637 a.a_dvp = dvp;
638 a.a_vpp = vpp;
639 a.a_cnp = cnp;
640 a.a_vap = vap;
641 return (VCALL(dvp, VOFFSET(vop_mkdir), &a));
642}
643
644struct vop_rmdir_args {
645 struct vnodeop_desc *a_desc;
646 struct vnode *a_dvp;
647 struct vnode *a_vp;
648 struct componentname *a_cnp;
649};
650extern struct vnodeop_desc vop_rmdir_desc;
651#define VOP_RMDIR(dvp, vp, cnp) _VOP_RMDIR(dvp, vp, cnp)
652static __inline int _VOP_RMDIR(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
653{
654 struct vop_rmdir_args a;
655 a.a_desc = VDESC(vop_rmdir);
656 a.a_dvp = dvp;
657 a.a_vp = vp;
658 a.a_cnp = cnp;
659 return (VCALL(dvp, VOFFSET(vop_rmdir), &a));
660}
661
662struct vop_symlink_args {
663 struct vnodeop_desc *a_desc;
664 struct vnode *a_dvp;
665 struct vnode **a_vpp;
666 struct componentname *a_cnp;
667 struct vattr *a_vap;
668 char *a_target;
669};
670extern struct vnodeop_desc vop_symlink_desc;
671#define VOP_SYMLINK(dvp, vpp, cnp, vap, target) _VOP_SYMLINK(dvp, vpp, cnp, vap, target)
672static __inline int _VOP_SYMLINK(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap, char *target)
673{
674 struct vop_symlink_args a;
675 a.a_desc = VDESC(vop_symlink);
676 a.a_dvp = dvp;
677 a.a_vpp = vpp;
678 a.a_cnp = cnp;
679 a.a_vap = vap;
680 a.a_target = target;
681 return (VCALL(dvp, VOFFSET(vop_symlink), &a));
682}
683
684struct vop_readdir_args {
685 struct vnodeop_desc *a_desc;
686 struct vnode *a_vp;
687 struct uio *a_uio;
688 struct ucred *a_cred;
689 int *a_eofflag;
690 int *a_ncookies;
691 u_long **a_cookies;
692};
693extern struct vnodeop_desc vop_readdir_desc;
694#define VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies) _VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies)
695static __inline int _VOP_READDIR(struct vnode *vp, struct uio *uio, struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies)
696{
697 struct vop_readdir_args a;
698 a.a_desc = VDESC(vop_readdir);
699 a.a_vp = vp;
700 a.a_uio = uio;
701 a.a_cred = cred;
702 a.a_eofflag = eofflag;
703 a.a_ncookies = ncookies;
704 a.a_cookies = cookies;
705 return (VCALL(vp, VOFFSET(vop_readdir), &a));
706}
707
708struct vop_readdirattr_args {
709 struct vnodeop_desc *a_desc;
710 struct vnode *a_vp;
711 struct attrlist *a_alist;
712 struct uio *a_uio;
713 u_long a_maxcount;
714 u_long a_options;
715 u_long *a_newstate;
716 int *a_eofflag;
717 u_long *a_actualcount;
718 u_long **a_cookies;
719 struct ucred *a_cred;
720};
721extern struct vnodeop_desc vop_readdirattr_desc;
722#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)
723static __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)
724{
725 struct vop_readdirattr_args a;
726 a.a_desc = VDESC(vop_readdirattr);
727 a.a_vp = vp;
728 a.a_alist = alist;
729 a.a_uio = uio;
730 a.a_maxcount = maxcount;
731 a.a_options = options;
732 a.a_newstate = newstate;
733 a.a_eofflag = eofflag;
734 a.a_actualcount = actualcount;
735 a.a_cookies = cookies;
736 a.a_cred = cred;
737 return (VCALL(vp, VOFFSET(vop_readdirattr), &a));
738}
739
740struct vop_readlink_args {
741 struct vnodeop_desc *a_desc;
742 struct vnode *a_vp;
743 struct uio *a_uio;
744 struct ucred *a_cred;
745};
746extern struct vnodeop_desc vop_readlink_desc;
747#define VOP_READLINK(vp, uio, cred) _VOP_READLINK(vp, uio, cred)
748static __inline int _VOP_READLINK(struct vnode *vp, struct uio *uio, struct ucred *cred)
749{
750 struct vop_readlink_args a;
751 a.a_desc = VDESC(vop_readlink);
752 a.a_vp = vp;
753 a.a_uio = uio;
754 a.a_cred = cred;
755 return (VCALL(vp, VOFFSET(vop_readlink), &a));
756}
757
758struct vop_abortop_args {
759 struct vnodeop_desc *a_desc;
760 struct vnode *a_dvp;
761 struct componentname *a_cnp;
762};
763extern struct vnodeop_desc vop_abortop_desc;
764#define VOP_ABORTOP(dvp, cnp) _VOP_ABORTOP(dvp, cnp)
765static __inline int _VOP_ABORTOP(struct vnode *dvp, struct componentname *cnp)
766{
767 struct vop_abortop_args a;
768 a.a_desc = VDESC(vop_abortop);
769 a.a_dvp = dvp;
770 a.a_cnp = cnp;
771 return (VCALL(dvp, VOFFSET(vop_abortop), &a));
772}
773
774struct vop_inactive_args {
775 struct vnodeop_desc *a_desc;
776 struct vnode *a_vp;
777 struct proc *a_p;
778};
779extern struct vnodeop_desc vop_inactive_desc;
780#define VOP_INACTIVE(vp, p) _VOP_INACTIVE(vp, p)
781static __inline int _VOP_INACTIVE(struct vnode *vp, struct proc *p)
782{
783 struct vop_inactive_args a;
784 a.a_desc = VDESC(vop_inactive);
785 a.a_vp = vp;
786 a.a_p = p;
787 return (VCALL(vp, VOFFSET(vop_inactive), &a));
788}
789
790struct vop_reclaim_args {
791 struct vnodeop_desc *a_desc;
792 struct vnode *a_vp;
793 struct proc *a_p;
794};
795extern struct vnodeop_desc vop_reclaim_desc;
796#define VOP_RECLAIM(vp, p) _VOP_RECLAIM(vp, p)
797static __inline int _VOP_RECLAIM(struct vnode *vp, struct proc *p)
798{
799 struct vop_reclaim_args a;
800 a.a_desc = VDESC(vop_reclaim);
801 a.a_vp = vp;
802 a.a_p = p;
803 return (VCALL(vp, VOFFSET(vop_reclaim), &a));
804}
805
806struct vop_lock_args {
807 struct vnodeop_desc *a_desc;
808 struct vnode *a_vp;
809 int a_flags;
810 struct proc *a_p;
811};
812extern struct vnodeop_desc vop_lock_desc;
813#define VOP_LOCK(vp, flags, p) _VOP_LOCK(vp, flags, p)
814static __inline int _VOP_LOCK(struct vnode *vp, int flags, struct proc *p)
815{
816 struct vop_lock_args a;
817 a.a_desc = VDESC(vop_lock);
818 a.a_vp = vp;
819 a.a_flags = flags;
820 a.a_p = p;
821 return (VCALL(vp, VOFFSET(vop_lock), &a));
822}
823
824struct vop_unlock_args {
825 struct vnodeop_desc *a_desc;
826 struct vnode *a_vp;
827 int a_flags;
828 struct proc *a_p;
829};
830extern struct vnodeop_desc vop_unlock_desc;
831#define VOP_UNLOCK(vp, flags, p) _VOP_UNLOCK(vp, flags, p)
832static __inline int _VOP_UNLOCK(struct vnode *vp, int flags, struct proc *p)
833{
834 struct vop_unlock_args a;
835 a.a_desc = VDESC(vop_unlock);
836 a.a_vp = vp;
837 a.a_flags = flags;
838 a.a_p = p;
839 return (VCALL(vp, VOFFSET(vop_unlock), &a));
840}
841
842struct vop_bmap_args {
843 struct vnodeop_desc *a_desc;
844 struct vnode *a_vp;
845 daddr_t a_bn;
846 struct vnode **a_vpp;
847 daddr_t *a_bnp;
848 int *a_runp;
849};
850extern struct vnodeop_desc vop_bmap_desc;
851#define VOP_BMAP(vp, bn, vpp, bnp, runp) _VOP_BMAP(vp, bn, vpp, bnp, runp)
852static __inline int _VOP_BMAP(struct vnode *vp, daddr_t bn, struct vnode **vpp, daddr_t *bnp, int *runp)
853{
854 struct vop_bmap_args a;
855 a.a_desc = VDESC(vop_bmap);
856 a.a_vp = vp;
857 a.a_bn = bn;
858 a.a_vpp = vpp;
859 a.a_bnp = bnp;
860 a.a_runp = runp;
861 return (VCALL(vp, VOFFSET(vop_bmap), &a));
862}
863
864struct vop_print_args {
865 struct vnodeop_desc *a_desc;
866 struct vnode *a_vp;
867};
868extern struct vnodeop_desc vop_print_desc;
869#define VOP_PRINT(vp) _VOP_PRINT(vp)
870static __inline int _VOP_PRINT(struct vnode *vp)
871{
872 struct vop_print_args a;
873 a.a_desc = VDESC(vop_print);
874 a.a_vp = vp;
875 return (VCALL(vp, VOFFSET(vop_print), &a));
876}
877
878struct vop_islocked_args {
879 struct vnodeop_desc *a_desc;
880 struct vnode *a_vp;
881};
882extern struct vnodeop_desc vop_islocked_desc;
883#define VOP_ISLOCKED(vp) _VOP_ISLOCKED(vp)
884static __inline int _VOP_ISLOCKED(struct vnode *vp)
885{
886 struct vop_islocked_args a;
887 a.a_desc = VDESC(vop_islocked);
888 a.a_vp = vp;
889 return (VCALL(vp, VOFFSET(vop_islocked), &a));
890}
891
892struct vop_pathconf_args {
893 struct vnodeop_desc *a_desc;
894 struct vnode *a_vp;
895 int a_name;
896 register_t *a_retval;
897};
898extern struct vnodeop_desc vop_pathconf_desc;
899#define VOP_PATHCONF(vp, name, retval) _VOP_PATHCONF(vp, name, retval)
900static __inline int _VOP_PATHCONF(struct vnode *vp, int name, register_t *retval)
901{
902 struct vop_pathconf_args a;
903 a.a_desc = VDESC(vop_pathconf);
904 a.a_vp = vp;
905 a.a_name = name;
906 a.a_retval = retval;
907 return (VCALL(vp, VOFFSET(vop_pathconf), &a));
908}
909
910struct vop_advlock_args {
911 struct vnodeop_desc *a_desc;
912 struct vnode *a_vp;
913 caddr_t a_id;
914 int a_op;
915 struct flock *a_fl;
916 int a_flags;
917};
918extern struct vnodeop_desc vop_advlock_desc;
919#define VOP_ADVLOCK(vp, id, op, fl, flags) _VOP_ADVLOCK(vp, id, op, fl, flags)
920static __inline int _VOP_ADVLOCK(struct vnode *vp, caddr_t id, int op, struct flock *fl, int flags)
921{
922 struct vop_advlock_args a;
923 a.a_desc = VDESC(vop_advlock);
924 a.a_vp = vp;
925 a.a_id = id;
926 a.a_op = op;
927 a.a_fl = fl;
928 a.a_flags = flags;
929 return (VCALL(vp, VOFFSET(vop_advlock), &a));
930}
931
932struct vop_blkatoff_args {
933 struct vnodeop_desc *a_desc;
934 struct vnode *a_vp;
935 off_t a_offset;
936 char **a_res;
937 struct buf **a_bpp;
938};
939extern struct vnodeop_desc vop_blkatoff_desc;
940#define VOP_BLKATOFF(vp, offset, res, bpp) _VOP_BLKATOFF(vp, offset, res, bpp)
941static __inline int _VOP_BLKATOFF(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
942{
943 struct vop_blkatoff_args a;
944 a.a_desc = VDESC(vop_blkatoff);
945 a.a_vp = vp;
946 a.a_offset = offset;
947 a.a_res = res;
948 a.a_bpp = bpp;
949 return (VCALL(vp, VOFFSET(vop_blkatoff), &a));
950}
951
952struct vop_valloc_args {
953 struct vnodeop_desc *a_desc;
954 struct vnode *a_pvp;
955 int a_mode;
956 struct ucred *a_cred;
957 struct vnode **a_vpp;
958};
959extern struct vnodeop_desc vop_valloc_desc;
960#define VOP_VALLOC(pvp, mode, cred, vpp) _VOP_VALLOC(pvp, mode, cred, vpp)
961static __inline int _VOP_VALLOC(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp)
962{
963 struct vop_valloc_args a;
964 a.a_desc = VDESC(vop_valloc);
965 a.a_pvp = pvp;
966 a.a_mode = mode;
967 a.a_cred = cred;
968 a.a_vpp = vpp;
969 return (VCALL(pvp, VOFFSET(vop_valloc), &a));
970}
971
972struct vop_reallocblks_args {
973 struct vnodeop_desc *a_desc;
974 struct vnode *a_vp;
975 struct cluster_save *a_buflist;
976};
977extern struct vnodeop_desc vop_reallocblks_desc;
978#define VOP_REALLOCBLKS(vp, buflist) _VOP_REALLOCBLKS(vp, buflist)
979static __inline int _VOP_REALLOCBLKS(struct vnode *vp, struct cluster_save *buflist)
980{
981 struct vop_reallocblks_args a;
982 a.a_desc = VDESC(vop_reallocblks);
983 a.a_vp = vp;
984 a.a_buflist = buflist;
985 return (VCALL(vp, VOFFSET(vop_reallocblks), &a));
986}
987
988struct vop_vfree_args {
989 struct vnodeop_desc *a_desc;
990 struct vnode *a_pvp;
991 ino_t a_ino;
992 int a_mode;
993};
994extern struct vnodeop_desc vop_vfree_desc;
995#define VOP_VFREE(pvp, ino, mode) _VOP_VFREE(pvp, ino, mode)
996static __inline int _VOP_VFREE(struct vnode *pvp, ino_t ino, int mode)
997{
998 struct vop_vfree_args a;
999 a.a_desc = VDESC(vop_vfree);
1000 a.a_pvp = pvp;
1001 a.a_ino = ino;
1002 a.a_mode = mode;
1003 return (VCALL(pvp, VOFFSET(vop_vfree), &a));
1004}
1005
1006struct vop_truncate_args {
1007 struct vnodeop_desc *a_desc;
1008 struct vnode *a_vp;
1009 off_t a_length;
1010 int a_flags;
1011 struct ucred *a_cred;
1012 struct proc *a_p;
1013};
1014extern struct vnodeop_desc vop_truncate_desc;
1015#define VOP_TRUNCATE(vp, length, flags, cred, p) _VOP_TRUNCATE(vp, length, flags, cred, p)
1016static __inline int _VOP_TRUNCATE(struct vnode *vp, off_t length, int flags, struct ucred *cred, struct proc *p)
1017{
1018 struct vop_truncate_args a;
1019 a.a_desc = VDESC(vop_truncate);
1020 a.a_vp = vp;
1021 a.a_length = length;
1022 a.a_flags = flags;
1023 a.a_cred = cred;
1024 a.a_p = p;
1025 {
1026 int _err;
1027 extern int ubc_hold();
1028 extern void ubc_rele();
1029 int _didhold = ubc_hold(vp);
1030 _err = VCALL(vp, VOFFSET(vop_truncate), &a);
1031 if (_didhold)
0b4e3aa0 1032 ubc_rele(vp);
1c79356b
A
1033 return (_err);
1034 }
1035}
1036
1037struct vop_allocate_args {
1038 struct vnodeop_desc *a_desc;
1039 struct vnode *a_vp;
1040 off_t a_length;
1041 u_int32_t a_flags;
1042 off_t *a_bytesallocated;
0b4e3aa0 1043 off_t a_offset;
1c79356b
A
1044 struct ucred *a_cred;
1045 struct proc *a_p;
1046};
1047extern struct vnodeop_desc vop_allocate_desc;
0b4e3aa0
A
1048#define VOP_ALLOCATE(vp, length, flags, bytesallocated, offset, cred, p) _VOP_ALLOCATE(vp, length, flags, bytesallocated, offset, cred, p)
1049static __inline int _VOP_ALLOCATE(struct vnode *vp, off_t length, u_int32_t flags, off_t *bytesallocated, off_t offset, struct ucred *cred, struct proc *p)
1c79356b
A
1050{
1051 struct vop_allocate_args a;
1052 a.a_desc = VDESC(vop_allocate);
1053 a.a_vp = vp;
1054 a.a_length = length;
1055 a.a_flags = flags;
1056 a.a_bytesallocated = bytesallocated;
0b4e3aa0 1057 a.a_offset = offset;
1c79356b
A
1058 a.a_cred = cred;
1059 a.a_p = p;
1060 return (VCALL(vp, VOFFSET(vop_allocate), &a));
1061}
1062
1063struct vop_update_args {
1064 struct vnodeop_desc *a_desc;
1065 struct vnode *a_vp;
1066 struct timeval *a_access;
1067 struct timeval *a_modify;
1068 int a_waitfor;
1069};
1070extern struct vnodeop_desc vop_update_desc;
1071#define VOP_UPDATE(vp, access, modify, waitfor) _VOP_UPDATE(vp, access, modify, waitfor)
1072static __inline int _VOP_UPDATE(struct vnode *vp, struct timeval *access, struct timeval *modify, int waitfor)
1073{
1074 struct vop_update_args a;
1075 a.a_desc = VDESC(vop_update);
1076 a.a_vp = vp;
1077 a.a_access = access;
1078 a.a_modify = modify;
1079 a.a_waitfor = waitfor;
1080 return (VCALL(vp, VOFFSET(vop_update), &a));
1081}
1082
1083struct vop_pgrd_args {
1084 struct vnodeop_desc *a_desc;
1085 struct vnode *a_vp;
1086 struct uio *a_uio;
1087 struct ucred *a_cred;
1088};
1089extern struct vnodeop_desc vop_pgrd_desc;
1090#define VOP_PGRD(vp, uio, cred) _VOP_PGRD(vp, uio, cred)
1091static __inline int _VOP_PGRD(struct vnode *vp, struct uio *uio, struct ucred *cred)
1092{
1093 struct vop_pgrd_args a;
1094 a.a_desc = VDESC(vop_pgrd);
1095 a.a_vp = vp;
1096 a.a_uio = uio;
1097 a.a_cred = cred;
1098 return (VCALL(vp, VOFFSET(vop_pgrd), &a));
1099}
1100
1101struct vop_pgwr_args {
1102 struct vnodeop_desc *a_desc;
1103 struct vnode *a_vp;
1104 struct uio *a_uio;
1105 struct ucred *a_cred;
1106 vm_offset_t a_offset;
1107};
1108extern struct vnodeop_desc vop_pgwr_desc;
1109#define VOP_PGWR(vp, uio, cred, offset) _VOP_PGWR(vp, uio, cred, offset)
1110static __inline int _VOP_PGWR(struct vnode *vp, struct uio *uio, struct ucred *cred, vm_offset_t offset)
1111{
1112 struct vop_pgwr_args a;
1113 a.a_desc = VDESC(vop_pgwr);
1114 a.a_vp = vp;
1115 a.a_uio = uio;
1116 a.a_cred = cred;
1117 a.a_offset = offset;
1118 return (VCALL(vp, VOFFSET(vop_pgwr), &a));
1119}
1120
1121struct vop_pagein_args {
1122 struct vnodeop_desc *a_desc;
1123 struct vnode *a_vp;
1124 upl_t a_pl;
1125 vm_offset_t a_pl_offset;
1126 off_t a_f_offset;
1127 size_t a_size;
1128 struct ucred *a_cred;
1129 int a_flags;
1130};
1131extern struct vnodeop_desc vop_pagein_desc;
1132#define VOP_PAGEIN(vp, pl, pl_offset, f_offset, size, cred, flags) _VOP_PAGEIN(vp, pl, pl_offset, f_offset, size, cred, flags)
1133static __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)
1134{
1135 struct vop_pagein_args a;
1136 a.a_desc = VDESC(vop_pagein);
1137 a.a_vp = vp;
1138 a.a_pl = pl;
1139 a.a_pl_offset = pl_offset;
1140 a.a_f_offset = f_offset;
1141 a.a_size = size;
1142 a.a_cred = cred;
1143 a.a_flags = flags;
1144 return (VCALL(vp, VOFFSET(vop_pagein), &a));
1145}
1146
1147struct vop_pageout_args {
1148 struct vnodeop_desc *a_desc;
1149 struct vnode *a_vp;
1150 upl_t a_pl;
1151 vm_offset_t a_pl_offset;
1152 off_t a_f_offset;
1153 size_t a_size;
1154 struct ucred *a_cred;
1155 int a_flags;
1156};
1157extern struct vnodeop_desc vop_pageout_desc;
1158#define VOP_PAGEOUT(vp, pl, pl_offset, f_offset, size, cred, flags) _VOP_PAGEOUT(vp, pl, pl_offset, f_offset, size, cred, flags)
1159static __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)
1160{
1161 struct vop_pageout_args a;
1162 a.a_desc = VDESC(vop_pageout);
1163 a.a_vp = vp;
1164 a.a_pl = pl;
1165 a.a_pl_offset = pl_offset;
1166 a.a_f_offset = f_offset;
1167 a.a_size = size;
1168 a.a_cred = cred;
1169 a.a_flags = flags;
1170 return (VCALL(vp, VOFFSET(vop_pageout), &a));
1171}
1172
1173struct vop_devblocksize_args {
1174 struct vnodeop_desc *a_desc;
1175 struct vnode *a_vp;
1176 register_t *a_retval;
1177};
1178extern struct vnodeop_desc vop_devblocksize_desc;
1179#define VOP_DEVBLOCKSIZE(vp, retval) _VOP_DEVBLOCKSIZE(vp, retval)
1180static __inline int _VOP_DEVBLOCKSIZE(struct vnode *vp, register_t *retval)
1181{
1182 struct vop_devblocksize_args a;
1183 a.a_desc = VDESC(vop_devblocksize);
1184 a.a_vp = vp;
1185 a.a_retval = retval;
1186 return (VCALL(vp, VOFFSET(vop_devblocksize), &a));
1187}
1188
1189struct vop_searchfs_args {
1190 struct vnodeop_desc *a_desc;
1191 struct vnode *a_vp;
1192 void *a_searchparams1;
1193 void *a_searchparams2;
1194 struct attrlist *a_searchattrs;
1195 u_long a_maxmatches;
1196 struct timeval *a_timelimit;
1197 struct attrlist *a_returnattrs;
1198 u_long *a_nummatches;
1199 u_long a_scriptcode;
1200 u_long a_options;
1201 struct uio *a_uio;
1202 struct searchstate *a_searchstate;
1203};
1204extern struct vnodeop_desc vop_searchfs_desc;
1205#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)
1206static __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)
1207{
1208 struct vop_searchfs_args a;
1209 a.a_desc = VDESC(vop_searchfs);
1210 a.a_vp = vp;
1211 a.a_searchparams1 = searchparams1;
1212 a.a_searchparams2 = searchparams2;
1213 a.a_searchattrs = searchattrs;
1214 a.a_maxmatches = maxmatches;
1215 a.a_timelimit = timelimit;
1216 a.a_returnattrs = returnattrs;
1217 a.a_nummatches = nummatches;
1218 a.a_scriptcode = scriptcode;
1219 a.a_options = options;
1220 a.a_uio = uio;
1221 a.a_searchstate = searchstate;
1222 return (VCALL(vp, VOFFSET(vop_searchfs), &a));
1223}
1224
1225struct vop_copyfile_args {
1226 struct vnodeop_desc *a_desc;
1227 struct vnode *a_fvp;
1228 struct vnode *a_tdvp;
1229 struct vnode *a_tvp;
1230 struct componentname *a_tcnp;
1231 int a_mode;
1232 int a_flags;
1233};
1234extern struct vnodeop_desc vop_copyfile_desc;
1235#define VOP_COPYFILE(fvp, tdvp, tvp, tcnp, mode, flags) _VOP_COPYFILE(fvp, tdvp, tvp, tcnp, mode, flags)
1236static __inline int _VOP_COPYFILE(struct vnode *fvp, struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp, int mode, int flags)
1237{
1238 struct vop_copyfile_args a;
1239 a.a_desc = VDESC(vop_copyfile);
1240 a.a_fvp = fvp;
1241 a.a_tdvp = tdvp;
1242 a.a_tvp = tvp;
1243 a.a_tcnp = tcnp;
1244 a.a_mode = mode;
1245 a.a_flags = flags;
1246 return (VCALL(fvp, VOFFSET(vop_copyfile), &a));
1247}
1248
1249struct vop_blktooff_args {
1250 struct vnodeop_desc *a_desc;
1251 struct vnode *a_vp;
1252 daddr_t a_lblkno;
1253 off_t *a_offset;
1254};
1255extern struct vnodeop_desc vop_blktooff_desc;
1256#define VOP_BLKTOOFF(vp, lblkno, offset) _VOP_BLKTOOFF(vp, lblkno, offset)
1257static __inline int _VOP_BLKTOOFF(struct vnode *vp, daddr_t lblkno, off_t *offset)
1258{
1259 struct vop_blktooff_args a;
1260 a.a_desc = VDESC(vop_blktooff);
1261 a.a_vp = vp;
1262 a.a_lblkno = lblkno;
1263 a.a_offset = offset;
1264 return (VCALL(vp, VOFFSET(vop_blktooff), &a));
1265}
1266
1267struct vop_offtoblk_args {
1268 struct vnodeop_desc *a_desc;
1269 struct vnode *a_vp;
1270 off_t a_offset;
1271 daddr_t *a_lblkno;
1272};
1273extern struct vnodeop_desc vop_offtoblk_desc;
1274#define VOP_OFFTOBLK(vp, offset, lblkno) _VOP_OFFTOBLK(vp, offset, lblkno)
1275static __inline int _VOP_OFFTOBLK(struct vnode *vp, off_t offset, daddr_t *lblkno)
1276{
1277 struct vop_offtoblk_args a;
1278 a.a_desc = VDESC(vop_offtoblk);
1279 a.a_vp = vp;
1280 a.a_offset = offset;
1281 a.a_lblkno = lblkno;
1282 return (VCALL(vp, VOFFSET(vop_offtoblk), &a));
1283}
1284
1285struct vop_cmap_args {
1286 struct vnodeop_desc *a_desc;
1287 struct vnode *a_vp;
1288 off_t a_foffset;
1289 size_t a_size;
1290 daddr_t *a_bpn;
1291 size_t *a_run;
1292 void *a_poff;
1293};
1294extern struct vnodeop_desc vop_cmap_desc;
1295#define VOP_CMAP(vp, foffset, size, bpn, run, poff) _VOP_CMAP(vp, foffset, size, bpn, run, poff)
1296static __inline int _VOP_CMAP(struct vnode *vp, off_t foffset, size_t size, daddr_t *bpn, size_t *run, void *poff)
1297{
1298 struct vop_cmap_args a;
1299 a.a_desc = VDESC(vop_cmap);
1300 a.a_vp = vp;
1301 a.a_foffset = foffset;
1302 a.a_size = size;
1303 a.a_bpn = bpn;
1304 a.a_run = run;
1305 a.a_poff = poff;
1306 return (VCALL(vp, VOFFSET(vop_cmap), &a));
1307}
1308
1309/* Special cases: */
1310#include <sys/buf.h>
1311#include <sys/vm.h>
1312
1313struct vop_strategy_args {
1314 struct vnodeop_desc *a_desc;
1315 struct buf *a_bp;
1316};
1317extern struct vnodeop_desc vop_strategy_desc;
1318#define VOP_STRATEGY(bp) _VOP_STRATEGY(bp)
1319static __inline int _VOP_STRATEGY(struct buf *bp)
1320{
1321 struct vop_strategy_args a;
1322 a.a_desc = VDESC(vop_strategy);
1323 a.a_bp = bp;
1324 return (VCALL(bp->b_vp, VOFFSET(vop_strategy), &a));
1325}
1326
1327struct vop_bwrite_args {
1328 struct vnodeop_desc *a_desc;
1329 struct buf *a_bp;
1330};
1331extern struct vnodeop_desc vop_bwrite_desc;
1332#define VOP_BWRITE(bp) _VOP_BWRITE(bp)
1333static __inline int _VOP_BWRITE(struct buf *bp)
1334{
1335 struct vop_bwrite_args a;
1336 a.a_desc = VDESC(vop_bwrite);
1337 a.a_bp = bp;
1338 return (VCALL(bp->b_vp, VOFFSET(vop_bwrite), &a));
1339}
1340
1341/* End of special cases. */
1342
1343#endif /* !_VNODE_IF_H_ */