Silence a compiler warning by adding parenthesis.
[dragonfly.git] / sys / kern / vfs_vopops.c
CommitLineData
2d3e977e
MD
1/*
2 *
3 * Copyright (c) 2004 The DragonFly Project. All rights reserved.
4 *
5 * This code is derived from software contributed to The DragonFly Project
6 * by Matthew Dillon <dillon@backplane.com>
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 * 3. Neither the name of The DragonFly Project nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific, prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
6ddb7618 35 * $DragonFly: src/sys/kern/vfs_vopops.c,v 1.11 2004/12/17 00:18:07 dillon Exp $
2d3e977e
MD
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/buf.h>
41#include <sys/conf.h>
42#include <sys/dirent.h>
43#include <sys/domain.h>
44#include <sys/eventhandler.h>
45#include <sys/fcntl.h>
46#include <sys/kernel.h>
47#include <sys/kthread.h>
48#include <sys/malloc.h>
49#include <sys/mbuf.h>
50#include <sys/mount.h>
51#include <sys/proc.h>
52#include <sys/namei.h>
53#include <sys/reboot.h>
54#include <sys/socket.h>
55#include <sys/stat.h>
56#include <sys/sysctl.h>
57#include <sys/syslog.h>
58#include <sys/vmmeter.h>
59#include <sys/vnode.h>
0961aa92 60#include <sys/vfsops.h>
2d3e977e
MD
61
62#include <machine/limits.h>
63
64#include <vm/vm.h>
65#include <vm/vm_object.h>
66#include <vm/vm_extern.h>
67#include <vm/vm_kern.h>
68#include <vm/pmap.h>
69#include <vm/vm_map.h>
70#include <vm/vm_page.h>
71#include <vm/vm_pager.h>
72#include <vm/vnode_pager.h>
73#include <vm/vm_zone.h>
74
75#include <sys/buf2.h>
76#include <sys/thread2.h>
77
78#define VOFFNAME(name) __CONCAT(__CONCAT(vop_,name),_vp_offsets)
79#define VDESCNAME(name) __CONCAT(__CONCAT(vop_,name),_desc)
80#define VARGSSTRUCT(name) struct __CONCAT(__CONCAT(vop_,name),_args)
81
82#define VNODEOP_DESC_INIT(name, flags, vpoffs, vpp, cred, proc, comp) \
83 struct vnodeop_desc VDESCNAME(name) = { \
84 __offsetof(struct vop_ops, __CONCAT(vop_, name)), \
85 #name, flags, vpoffs, vpp, cred, proc, comp }
86
87#define VNODEOP_DESC_INIT_SIMPLE(name) \
88 VNODEOP_DESC_INIT(name, 0, NULL, \
89 VDESC_NO_OFFSET, \
90 VDESC_NO_OFFSET, \
91 VDESC_NO_OFFSET, \
92 VDESC_NO_OFFSET)
93
94#define VNODEOP_DESC_INIT_VP(name) \
95 static int VOFFNAME(name)[] = { \
96 __offsetof(VARGSSTRUCT(name), a_vp), \
97 VDESC_NO_OFFSET }; \
98 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
99 VDESC_NO_OFFSET, \
100 VDESC_NO_OFFSET, \
101 VDESC_NO_OFFSET, \
102 VDESC_NO_OFFSET)
103
104#define VNODEOP_DESC_INIT_VP_VPP(name) \
105 static int VOFFNAME(name)[] = { \
106 __offsetof(VARGSSTRUCT(name), a_vp), \
107 VDESC_NO_OFFSET }; \
108 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
109 __offsetof(VARGSSTRUCT(name), a_vpp), \
110 VDESC_NO_OFFSET, \
111 VDESC_NO_OFFSET, \
112 VDESC_NO_OFFSET)
113
114#define VNODEOP_DESC_INIT_VP_CRED(name) \
115 static int VOFFNAME(name)[] = { \
116 __offsetof(VARGSSTRUCT(name), a_vp), \
117 VDESC_NO_OFFSET }; \
118 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
119 VDESC_NO_OFFSET, \
120 __offsetof(VARGSSTRUCT(name), a_cred), \
121 VDESC_NO_OFFSET, \
122 VDESC_NO_OFFSET)
123
690a3127
MD
124#define VNODEOP_DESC_INIT_NCP(name) \
125 VNODEOP_DESC_INIT(name, 0, NULL, \
126 VDESC_NO_OFFSET, \
127 VDESC_NO_OFFSET, \
128 VDESC_NO_OFFSET, \
129 VDESC_NO_OFFSET)
130
fad57d0e
MD
131#define VNODEOP_DESC_INIT_NCP2_CRED(name) \
132 VNODEOP_DESC_INIT(name, 0, NULL, \
133 VDESC_NO_OFFSET, \
134 __offsetof(VARGSSTRUCT(name), a_cred), \
135 VDESC_NO_OFFSET, \
136 VDESC_NO_OFFSET)
137
21739618
MD
138#define VNODEOP_DESC_INIT_NCP_CRED(name) \
139 VNODEOP_DESC_INIT(name, 0, NULL, \
140 VDESC_NO_OFFSET, \
141 __offsetof(VARGSSTRUCT(name), a_cred), \
142 VDESC_NO_OFFSET, \
143 VDESC_NO_OFFSET)
144
fad57d0e
MD
145#define VNODEOP_DESC_INIT_NCP_VP_CRED(name) \
146 static int VOFFNAME(name)[] = { \
147 __offsetof(VARGSSTRUCT(name), a_vp), \
148 VDESC_NO_OFFSET }; \
149 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
150 VDESC_NO_OFFSET, \
151 __offsetof(VARGSSTRUCT(name), a_cred), \
152 VDESC_NO_OFFSET, \
153 VDESC_NO_OFFSET)
154
155#define VNODEOP_DESC_INIT_NCP_CRED_VPP(name) \
156 VNODEOP_DESC_INIT(name, 0, NULL, \
157 __offsetof(VARGSSTRUCT(name), a_vpp), \
158 __offsetof(VARGSSTRUCT(name), a_cred), \
159 VDESC_NO_OFFSET, \
160 VDESC_NO_OFFSET)
161
2d3e977e
MD
162#define VNODEOP_DESC_INIT_DVP_VPP_CNP(name) \
163 static int VOFFNAME(name)[] = { \
164 __offsetof(VARGSSTRUCT(name), a_dvp), \
165 VDESC_NO_OFFSET }; \
166 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
167 __offsetof(VARGSSTRUCT(name), a_vpp), \
168 VDESC_NO_OFFSET, \
169 VDESC_NO_OFFSET, \
170 __offsetof(VARGSSTRUCT(name), a_cnp))
171
fad57d0e
MD
172#define VNODEOP_DESC_INIT_DVP_VPP_CRED(name) \
173 static int VOFFNAME(name)[] = { \
174 __offsetof(VARGSSTRUCT(name), a_dvp), \
175 VDESC_NO_OFFSET }; \
176 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
177 __offsetof(VARGSSTRUCT(name), a_vpp), \
178 __offsetof(VARGSSTRUCT(name), a_cred), \
179 VDESC_NO_OFFSET, \
180 VDESC_NO_OFFSET)
181
2d3e977e
MD
182#define VNODEOP_DESC_INIT_DVP_CNP(name) \
183 static int VOFFNAME(name)[] = { \
184 __offsetof(VARGSSTRUCT(name), a_dvp), \
185 VDESC_NO_OFFSET }; \
186 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
187 VDESC_NO_OFFSET, \
188 VDESC_NO_OFFSET, \
189 VDESC_NO_OFFSET, \
190 __offsetof(VARGSSTRUCT(name), a_cnp))
191
192#define VNODEOP_DESC_INIT_DVP_VP_CNP(name) \
193 static int VOFFNAME(name)[] = { \
194 __offsetof(VARGSSTRUCT(name), a_dvp), \
195 __offsetof(VARGSSTRUCT(name), a_vp), \
196 VDESC_NO_OFFSET }; \
197 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
198 VDESC_NO_OFFSET, \
199 VDESC_NO_OFFSET, \
200 VDESC_NO_OFFSET, \
201 __offsetof(VARGSSTRUCT(name), a_cnp))
202
203#define VNODEOP_DESC_INIT_TDVP_VP_CNP(name) \
204 static int VOFFNAME(name)[] = { \
205 __offsetof(VARGSSTRUCT(name), a_tdvp), \
206 __offsetof(VARGSSTRUCT(name), a_vp), \
207 VDESC_NO_OFFSET }; \
208 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
209 VDESC_NO_OFFSET, \
210 VDESC_NO_OFFSET, \
211 VDESC_NO_OFFSET, \
212 __offsetof(VARGSSTRUCT(name), a_cnp))
213
214VNODEOP_DESC_INIT_SIMPLE(default);
215VNODEOP_DESC_INIT_VP(islocked);
216VNODEOP_DESC_INIT_DVP_VPP_CNP(lookup);
2d3e977e
MD
217VNODEOP_DESC_INIT_DVP_VPP_CNP(create);
218VNODEOP_DESC_INIT_DVP_CNP(whiteout);
219VNODEOP_DESC_INIT_DVP_VPP_CNP(mknod);
220VNODEOP_DESC_INIT_VP_CRED(open);
221VNODEOP_DESC_INIT_VP(close);
222VNODEOP_DESC_INIT_VP_CRED(access);
223VNODEOP_DESC_INIT_VP(getattr);
224VNODEOP_DESC_INIT_VP_CRED(setattr);
225VNODEOP_DESC_INIT_VP_CRED(read);
226VNODEOP_DESC_INIT_VP_CRED(write);
227VNODEOP_DESC_INIT_VP_CRED(lease);
228VNODEOP_DESC_INIT_VP_CRED(ioctl);
229VNODEOP_DESC_INIT_VP_CRED(poll);
230VNODEOP_DESC_INIT_VP(kqfilter);
231VNODEOP_DESC_INIT_VP(revoke);
232VNODEOP_DESC_INIT_VP_CRED(mmap);
233VNODEOP_DESC_INIT_VP(fsync);
234VNODEOP_DESC_INIT_DVP_VP_CNP(remove);
235VNODEOP_DESC_INIT_TDVP_VP_CNP(link);
236
237static int VOFFNAME(rename)[] = {
238 __offsetof(VARGSSTRUCT(rename), a_fdvp),
239 __offsetof(VARGSSTRUCT(rename), a_fvp),
240 __offsetof(VARGSSTRUCT(rename), a_tdvp),
241 __offsetof(VARGSSTRUCT(rename), a_tvp),
242 VDESC_NO_OFFSET
243};
244VNODEOP_DESC_INIT(rename,
245 VDESC_VP0_WILLRELE|VDESC_VP1_WILLRELE|
3446c007
MD
246 VDESC_VP2_WILLRELE|VDESC_VP3_WILLRELE|
247 VDESC_VP2_WILLUNLOCK|VDESC_VP3_WILLUNLOCK, /* tdvp and tvp */
2d3e977e
MD
248 VOFFNAME(rename),
249 VDESC_NO_OFFSET,
250 VDESC_NO_OFFSET,
251 VDESC_NO_OFFSET,
252 __offsetof(VARGSSTRUCT(rename), a_fcnp));
fad57d0e 253
2d3e977e
MD
254VNODEOP_DESC_INIT_DVP_VPP_CNP(mkdir);
255VNODEOP_DESC_INIT_DVP_VP_CNP(rmdir);
256VNODEOP_DESC_INIT_DVP_VPP_CNP(symlink);
257VNODEOP_DESC_INIT_VP_CRED(readdir);
258VNODEOP_DESC_INIT_VP_CRED(readlink);
259VNODEOP_DESC_INIT_VP(inactive);
260VNODEOP_DESC_INIT_VP(reclaim);
261VNODEOP_DESC_INIT_VP(lock);
262VNODEOP_DESC_INIT_VP(unlock);
263VNODEOP_DESC_INIT_VP_VPP(bmap);
264VNODEOP_DESC_INIT_VP(strategy);
265VNODEOP_DESC_INIT_VP(print);
266VNODEOP_DESC_INIT_VP(pathconf);
267VNODEOP_DESC_INIT_VP(advlock);
268VNODEOP_DESC_INIT_VP_CRED(balloc);
269VNODEOP_DESC_INIT_VP(reallocblks);
270VNODEOP_DESC_INIT_VP(getpages);
271VNODEOP_DESC_INIT_VP(putpages);
272VNODEOP_DESC_INIT_VP(freeblks);
273VNODEOP_DESC_INIT_VP(bwrite);
274VNODEOP_DESC_INIT_VP_CRED(getacl);
275VNODEOP_DESC_INIT_VP_CRED(setacl);
276VNODEOP_DESC_INIT_VP_CRED(aclcheck);
277VNODEOP_DESC_INIT_VP_CRED(getextattr);
278VNODEOP_DESC_INIT_VP_CRED(setextattr);
279VNODEOP_DESC_INIT_VP(createvobject);
280VNODEOP_DESC_INIT_VP(destroyvobject);
281VNODEOP_DESC_INIT_VP(getvobject);
cbe54d63
MD
282VNODEOP_DESC_INIT_SIMPLE(vfsset);
283
fad57d0e
MD
284VNODEOP_DESC_INIT_NCP_CRED(nresolve);
285VNODEOP_DESC_INIT_DVP_VPP_CRED(nlookupdotdot);
286VNODEOP_DESC_INIT_NCP_CRED_VPP(ncreate);
287VNODEOP_DESC_INIT_NCP_CRED_VPP(nmkdir);
288VNODEOP_DESC_INIT_NCP_CRED_VPP(nmknod);
289VNODEOP_DESC_INIT_NCP_VP_CRED(nlink);
290VNODEOP_DESC_INIT_NCP_CRED_VPP(nsymlink);
291VNODEOP_DESC_INIT_NCP_CRED(nwhiteout);
292VNODEOP_DESC_INIT_NCP_CRED(nremove);
293VNODEOP_DESC_INIT_NCP_CRED(nrmdir);
294VNODEOP_DESC_INIT_NCP2_CRED(nrename);
295
6ddb7618
MD
296#define DO_OPS(ops, error, ap, vop_field) \
297 error = ops->vop_field(ap);
2d3e977e 298
0961aa92
MD
299/************************************************************************
300 * PRIMARY HIGH LEVEL VNODE OPERATIONS CALLS *
301 ************************************************************************
302 *
303 * These procedures are called directly from the kernel and/or fileops
304 * code to perform file/device operations on the system.
305 */
306
2d3e977e 307int
0961aa92 308vop_islocked(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
309{
310 struct vop_islocked_args ap;
cbe54d63 311 int error;
2d3e977e
MD
312
313 ap.a_head.a_desc = &vop_islocked_desc;
0961aa92 314 ap.a_head.a_ops = ops;
2d3e977e
MD
315 ap.a_vp = vp;
316 ap.a_td = td;
cbe54d63
MD
317
318 DO_OPS(ops, error, &ap, vop_islocked);
319 return(error);
2d3e977e
MD
320}
321
322int
0961aa92 323vop_lookup(struct vop_ops *ops, struct vnode *dvp,
26b67a34 324 struct vnode **vpp, struct componentname *cnp)
2d3e977e
MD
325{
326 struct vop_lookup_args ap;
cbe54d63 327 int error;
2d3e977e
MD
328
329 ap.a_head.a_desc = &vop_lookup_desc;
0961aa92 330 ap.a_head.a_ops = ops;
2d3e977e 331 ap.a_dvp = dvp;
2d3e977e 332 ap.a_vpp = vpp;
2d3e977e 333 ap.a_cnp = cnp;
cbe54d63
MD
334
335 DO_OPS(ops, error, &ap, vop_lookup);
336 return(error);
2d3e977e
MD
337}
338
339int
fad57d0e 340vop_create(struct vop_ops *ops, struct vnode *dvp,
0961aa92 341 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e
MD
342{
343 struct vop_create_args ap;
cbe54d63 344 int error;
2d3e977e
MD
345
346 ap.a_head.a_desc = &vop_create_desc;
0961aa92 347 ap.a_head.a_ops = ops;
2d3e977e 348 ap.a_dvp = dvp;
2d3e977e
MD
349 ap.a_vpp = vpp;
350 ap.a_cnp = cnp;
351 ap.a_vap = vap;
cbe54d63
MD
352
353 DO_OPS(ops, error, &ap, vop_create);
354 return(error);
2d3e977e
MD
355}
356
357int
fad57d0e 358vop_whiteout(struct vop_ops *ops, struct vnode *dvp,
0961aa92 359 struct componentname *cnp, int flags)
2d3e977e
MD
360{
361 struct vop_whiteout_args ap;
cbe54d63 362 int error;
2d3e977e
MD
363
364 ap.a_head.a_desc = &vop_whiteout_desc;
0961aa92 365 ap.a_head.a_ops = ops;
2d3e977e 366 ap.a_dvp = dvp;
2d3e977e
MD
367 ap.a_cnp = cnp;
368 ap.a_flags = flags;
cbe54d63
MD
369
370 DO_OPS(ops, error, &ap, vop_whiteout);
371 return(error);
2d3e977e
MD
372}
373
374int
fad57d0e 375vop_mknod(struct vop_ops *ops, struct vnode *dvp,
0961aa92 376 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e
MD
377{
378 struct vop_mknod_args ap;
cbe54d63 379 int error;
2d3e977e
MD
380
381 ap.a_head.a_desc = &vop_mknod_desc;
0961aa92 382 ap.a_head.a_ops = ops;
2d3e977e 383 ap.a_dvp = dvp;
2d3e977e
MD
384 ap.a_vpp = vpp;
385 ap.a_cnp = cnp;
386 ap.a_vap = vap;
cbe54d63
MD
387
388 DO_OPS(ops, error, &ap, vop_mknod);
389 return(error);
2d3e977e
MD
390}
391
392int
0961aa92 393vop_open(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
fad57d0e 394 struct file *fp, struct thread *td)
2d3e977e
MD
395{
396 struct vop_open_args ap;
cbe54d63 397 int error;
2d3e977e
MD
398
399 ap.a_head.a_desc = &vop_open_desc;
0961aa92 400 ap.a_head.a_ops = ops;
2d3e977e 401 ap.a_vp = vp;
fad57d0e 402 ap.a_fp = fp;
2d3e977e
MD
403 ap.a_mode = mode;
404 ap.a_cred = cred;
405 ap.a_td = td;
cbe54d63
MD
406
407 DO_OPS(ops, error, &ap, vop_open);
408 return(error);
2d3e977e
MD
409}
410
411int
0961aa92 412vop_close(struct vop_ops *ops, struct vnode *vp, int fflag, struct thread *td)
2d3e977e
MD
413{
414 struct vop_close_args ap;
cbe54d63 415 int error;
2d3e977e
MD
416
417 ap.a_head.a_desc = &vop_close_desc;
0961aa92 418 ap.a_head.a_ops = ops;
2d3e977e
MD
419 ap.a_vp = vp;
420 ap.a_fflag = fflag;
421 ap.a_td = td;
cbe54d63
MD
422
423 DO_OPS(ops, error, &ap, vop_close);
424 return(error);
2d3e977e
MD
425}
426
427int
0961aa92
MD
428vop_access(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
429 struct thread *td)
2d3e977e
MD
430{
431 struct vop_access_args ap;
cbe54d63 432 int error;
2d3e977e
MD
433
434 ap.a_head.a_desc = &vop_access_desc;
0961aa92 435 ap.a_head.a_ops = ops;
2d3e977e
MD
436 ap.a_vp = vp;
437 ap.a_mode = mode;
438 ap.a_cred = cred;
439 ap.a_td = td;
cbe54d63
MD
440
441 DO_OPS(ops, error, &ap, vop_access);
442 return(error);
2d3e977e
MD
443}
444
445int
0961aa92
MD
446vop_getattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap,
447 struct thread *td)
2d3e977e
MD
448{
449 struct vop_getattr_args ap;
cbe54d63 450 int error;
2d3e977e
MD
451
452 ap.a_head.a_desc = &vop_getattr_desc;
0961aa92 453 ap.a_head.a_ops = ops;
2d3e977e
MD
454 ap.a_vp = vp;
455 ap.a_vap = vap;
456 ap.a_td = td;
cbe54d63
MD
457
458 DO_OPS(ops, error, &ap, vop_getattr);
459 return(error);
2d3e977e
MD
460}
461
462int
0961aa92
MD
463vop_setattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap,
464 struct ucred *cred, struct thread *td)
2d3e977e
MD
465{
466 struct vop_setattr_args ap;
cbe54d63 467 int error;
2d3e977e
MD
468
469 ap.a_head.a_desc = &vop_setattr_desc;
0961aa92 470 ap.a_head.a_ops = ops;
2d3e977e
MD
471 ap.a_vp = vp;
472 ap.a_vap = vap;
473 ap.a_cred = cred;
474 ap.a_td = td;
cbe54d63
MD
475
476 DO_OPS(ops, error, &ap, vop_setattr);
477 return(error);
2d3e977e
MD
478}
479
480int
0961aa92
MD
481vop_read(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
482 struct ucred *cred)
2d3e977e
MD
483{
484 struct vop_read_args ap;
cbe54d63 485 int error;
2d3e977e
MD
486
487 ap.a_head.a_desc = &vop_read_desc;
0961aa92 488 ap.a_head.a_ops = ops;
2d3e977e
MD
489 ap.a_vp = vp;
490 ap.a_uio = uio;
491 ap.a_ioflag = ioflag;
492 ap.a_cred = cred;
cbe54d63
MD
493
494 DO_OPS(ops, error, &ap, vop_read);
495 return(error);
2d3e977e
MD
496}
497
498int
0961aa92
MD
499vop_write(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
500 struct ucred *cred)
2d3e977e
MD
501{
502 struct vop_write_args ap;
cbe54d63 503 int error;
2d3e977e
MD
504
505 ap.a_head.a_desc = &vop_write_desc;
0961aa92 506 ap.a_head.a_ops = ops;
2d3e977e
MD
507 ap.a_vp = vp;
508 ap.a_uio = uio;
509 ap.a_ioflag = ioflag;
510 ap.a_cred = cred;
cbe54d63
MD
511
512 DO_OPS(ops, error, &ap, vop_write);
513 return(error);
2d3e977e
MD
514}
515
516int
0961aa92
MD
517vop_lease(struct vop_ops *ops, struct vnode *vp, struct thread *td,
518 struct ucred *cred, int flag)
2d3e977e
MD
519{
520 struct vop_lease_args ap;
cbe54d63 521 int error;
2d3e977e
MD
522
523 ap.a_head.a_desc = &vop_lease_desc;
0961aa92 524 ap.a_head.a_ops = ops;
2d3e977e
MD
525 ap.a_vp = vp;
526 ap.a_td = td;
527 ap.a_cred = cred;
528 ap.a_flag = flag;
cbe54d63
MD
529
530 DO_OPS(ops, error, &ap, vop_lease);
531 return(error);
2d3e977e
MD
532}
533
534int
0961aa92
MD
535vop_ioctl(struct vop_ops *ops, struct vnode *vp, u_long command, caddr_t data,
536 int fflag, struct ucred *cred,
537 struct thread *td)
2d3e977e
MD
538{
539 struct vop_ioctl_args ap;
cbe54d63 540 int error;
2d3e977e
MD
541
542 ap.a_head.a_desc = &vop_ioctl_desc;
0961aa92 543 ap.a_head.a_ops = ops;
2d3e977e
MD
544 ap.a_vp = vp;
545 ap.a_command = command;
546 ap.a_data = data;
547 ap.a_fflag = fflag;
548 ap.a_cred = cred;
549 ap.a_td = td;
cbe54d63
MD
550
551 DO_OPS(ops, error, &ap, vop_ioctl);
552 return(error);
2d3e977e
MD
553}
554
555int
0961aa92
MD
556vop_poll(struct vop_ops *ops, struct vnode *vp, int events, struct ucred *cred,
557 struct thread *td)
2d3e977e
MD
558{
559 struct vop_poll_args ap;
cbe54d63 560 int error;
2d3e977e
MD
561
562 ap.a_head.a_desc = &vop_poll_desc;
0961aa92 563 ap.a_head.a_ops = ops;
2d3e977e
MD
564 ap.a_vp = vp;
565 ap.a_events = events;
566 ap.a_cred = cred;
567 ap.a_td = td;
cbe54d63
MD
568
569 DO_OPS(ops, error, &ap, vop_poll);
570 return(error);
2d3e977e
MD
571}
572
573int
0961aa92 574vop_kqfilter(struct vop_ops *ops, struct vnode *vp, struct knote *kn)
2d3e977e
MD
575{
576 struct vop_kqfilter_args ap;
cbe54d63 577 int error;
2d3e977e
MD
578
579 ap.a_head.a_desc = &vop_kqfilter_desc;
0961aa92 580 ap.a_head.a_ops = ops;
2d3e977e
MD
581 ap.a_vp = vp;
582 ap.a_kn = kn;
cbe54d63
MD
583
584 DO_OPS(ops, error, &ap, vop_kqfilter);
585 return(error);
2d3e977e
MD
586}
587
588int
0961aa92 589vop_revoke(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
590{
591 struct vop_revoke_args ap;
cbe54d63 592 int error;
2d3e977e
MD
593
594 ap.a_head.a_desc = &vop_revoke_desc;
0961aa92 595 ap.a_head.a_ops = ops;
2d3e977e
MD
596 ap.a_vp = vp;
597 ap.a_flags = flags;
cbe54d63
MD
598
599 DO_OPS(ops, error, &ap, vop_revoke);
600 return(error);
2d3e977e
MD
601}
602
603int
0961aa92
MD
604vop_mmap(struct vop_ops *ops, struct vnode *vp, int fflags, struct ucred *cred,
605 struct thread *td)
2d3e977e
MD
606{
607 struct vop_mmap_args ap;
cbe54d63 608 int error;
2d3e977e
MD
609
610 ap.a_head.a_desc = &vop_mmap_desc;
0961aa92 611 ap.a_head.a_ops = ops;
2d3e977e
MD
612 ap.a_vp = vp;
613 ap.a_fflags = fflags;
614 ap.a_cred = cred;
615 ap.a_td = td;
cbe54d63
MD
616
617 DO_OPS(ops, error, &ap, vop_mmap);
618 return(error);
2d3e977e
MD
619}
620
621int
0961aa92 622vop_fsync(struct vop_ops *ops, struct vnode *vp, int waitfor, struct thread *td)
2d3e977e
MD
623{
624 struct vop_fsync_args ap;
cbe54d63 625 int error;
2d3e977e
MD
626
627 ap.a_head.a_desc = &vop_fsync_desc;
0961aa92 628 ap.a_head.a_ops = ops;
2d3e977e
MD
629 ap.a_vp = vp;
630 ap.a_waitfor = waitfor;
631 ap.a_td = td;
cbe54d63
MD
632
633 DO_OPS(ops, error, &ap, vop_fsync);
634 return(error);
2d3e977e
MD
635}
636
637int
fad57d0e 638vop_remove(struct vop_ops *ops, struct vnode *dvp,
0961aa92 639 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
640{
641 struct vop_remove_args ap;
cbe54d63 642 int error;
2d3e977e
MD
643
644 ap.a_head.a_desc = &vop_remove_desc;
0961aa92 645 ap.a_head.a_ops = ops;
2d3e977e 646 ap.a_dvp = dvp;
2d3e977e
MD
647 ap.a_vp = vp;
648 ap.a_cnp = cnp;
cbe54d63
MD
649
650 DO_OPS(ops, error, &ap, vop_remove);
651 return(error);
2d3e977e
MD
652}
653
21739618 654int
fad57d0e 655vop_link(struct vop_ops *ops, struct vnode *tdvp,
0961aa92 656 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
657{
658 struct vop_link_args ap;
cbe54d63 659 int error;
2d3e977e
MD
660
661 ap.a_head.a_desc = &vop_link_desc;
0961aa92 662 ap.a_head.a_ops = ops;
2d3e977e 663 ap.a_tdvp = tdvp;
2d3e977e
MD
664 ap.a_vp = vp;
665 ap.a_cnp = cnp;
cbe54d63
MD
666
667 DO_OPS(ops, error, &ap, vop_link);
668 return(error);
2d3e977e
MD
669}
670
671int
fad57d0e
MD
672vop_rename(struct vop_ops *ops,
673 struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp,
674 struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp)
2d3e977e
MD
675{
676 struct vop_rename_args ap;
cbe54d63 677 int error;
2d3e977e
MD
678
679 ap.a_head.a_desc = &vop_rename_desc;
0961aa92 680 ap.a_head.a_ops = ops;
2d3e977e 681 ap.a_fdvp = fdvp;
2d3e977e
MD
682 ap.a_fvp = fvp;
683 ap.a_fcnp = fcnp;
684 ap.a_tdvp = tdvp;
2d3e977e
MD
685 ap.a_tvp = tvp;
686 ap.a_tcnp = tcnp;
cbe54d63
MD
687
688 DO_OPS(ops, error, &ap, vop_rename);
689 return(error);
2d3e977e
MD
690}
691
692int
fad57d0e 693vop_mkdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 694 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e
MD
695{
696 struct vop_mkdir_args ap;
cbe54d63 697 int error;
2d3e977e
MD
698
699 ap.a_head.a_desc = &vop_mkdir_desc;
0961aa92 700 ap.a_head.a_ops = ops;
2d3e977e 701 ap.a_dvp = dvp;
2d3e977e
MD
702 ap.a_vpp = vpp;
703 ap.a_cnp = cnp;
704 ap.a_vap = vap;
cbe54d63
MD
705
706 DO_OPS(ops, error, &ap, vop_mkdir);
707 return(error);
2d3e977e
MD
708}
709
710int
fad57d0e 711vop_rmdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 712 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
713{
714 struct vop_rmdir_args ap;
cbe54d63 715 int error;
2d3e977e
MD
716
717 ap.a_head.a_desc = &vop_rmdir_desc;
0961aa92 718 ap.a_head.a_ops = ops;
2d3e977e 719 ap.a_dvp = dvp;
2d3e977e
MD
720 ap.a_vp = vp;
721 ap.a_cnp = cnp;
cbe54d63
MD
722
723 DO_OPS(ops, error, &ap, vop_rmdir);
724 return(error);
2d3e977e
MD
725}
726
727int
fad57d0e 728vop_symlink(struct vop_ops *ops, struct vnode *dvp,
0961aa92
MD
729 struct vnode **vpp, struct componentname *cnp,
730 struct vattr *vap, char *target)
2d3e977e
MD
731{
732 struct vop_symlink_args ap;
cbe54d63 733 int error;
2d3e977e
MD
734
735 ap.a_head.a_desc = &vop_symlink_desc;
0961aa92 736 ap.a_head.a_ops = ops;
2d3e977e 737 ap.a_dvp = dvp;
2d3e977e
MD
738 ap.a_vpp = vpp;
739 ap.a_cnp = cnp;
740 ap.a_vap = vap;
741 ap.a_target = target;
cbe54d63
MD
742
743 DO_OPS(ops, error, &ap, vop_symlink);
744 return(error);
2d3e977e
MD
745}
746
747int
0961aa92
MD
748vop_readdir(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
749 struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies)
2d3e977e
MD
750{
751 struct vop_readdir_args ap;
cbe54d63 752 int error;
2d3e977e
MD
753
754 ap.a_head.a_desc = &vop_readdir_desc;
0961aa92 755 ap.a_head.a_ops = ops;
2d3e977e
MD
756 ap.a_vp = vp;
757 ap.a_uio = uio;
758 ap.a_cred = cred;
759 ap.a_eofflag = eofflag;
760 ap.a_ncookies = ncookies;
761 ap.a_cookies = cookies;
cbe54d63
MD
762
763 DO_OPS(ops, error, &ap, vop_readdir);
764 return(error);
2d3e977e
MD
765}
766
767int
0961aa92
MD
768vop_readlink(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
769 struct ucred *cred)
2d3e977e
MD
770{
771 struct vop_readlink_args ap;
cbe54d63 772 int error;
2d3e977e
MD
773
774 ap.a_head.a_desc = &vop_readlink_desc;
0961aa92 775 ap.a_head.a_ops = ops;
2d3e977e
MD
776 ap.a_vp = vp;
777 ap.a_uio = uio;
778 ap.a_cred = cred;
cbe54d63
MD
779
780 DO_OPS(ops, error, &ap, vop_readlink);
781 return(error);
2d3e977e
MD
782}
783
784int
0961aa92 785vop_inactive(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
786{
787 struct vop_inactive_args ap;
cbe54d63 788 int error;
2d3e977e
MD
789
790 ap.a_head.a_desc = &vop_inactive_desc;
0961aa92 791 ap.a_head.a_ops = ops;
2d3e977e
MD
792 ap.a_vp = vp;
793 ap.a_td = td;
cbe54d63
MD
794
795 DO_OPS(ops, error, &ap, vop_inactive);
796 return(error);
2d3e977e
MD
797}
798
799int
0961aa92 800vop_reclaim(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
801{
802 struct vop_reclaim_args ap;
cbe54d63 803 int error;
2d3e977e
MD
804
805 ap.a_head.a_desc = &vop_reclaim_desc;
0961aa92 806 ap.a_head.a_ops = ops;
2d3e977e
MD
807 ap.a_vp = vp;
808 ap.a_td = td;
cbe54d63
MD
809
810 DO_OPS(ops, error, &ap, vop_reclaim);
811 return(error);
2d3e977e
MD
812}
813
814int
5fd012e0 815vop_lock(struct vop_ops *ops, struct vnode *vp, int flags, struct thread *td)
2d3e977e
MD
816{
817 struct vop_lock_args ap;
cbe54d63 818 int error;
2d3e977e
MD
819
820 ap.a_head.a_desc = &vop_lock_desc;
0961aa92 821 ap.a_head.a_ops = ops;
2d3e977e 822 ap.a_vp = vp;
2d3e977e
MD
823 ap.a_flags = flags;
824 ap.a_td = td;
cbe54d63
MD
825
826 DO_OPS(ops, error, &ap, vop_lock);
827 return(error);
2d3e977e
MD
828}
829
830int
5fd012e0 831vop_unlock(struct vop_ops *ops, struct vnode *vp, int flags, struct thread *td)
2d3e977e
MD
832{
833 struct vop_unlock_args ap;
cbe54d63 834 int error;
2d3e977e
MD
835
836 ap.a_head.a_desc = &vop_unlock_desc;
0961aa92 837 ap.a_head.a_ops = ops;
2d3e977e 838 ap.a_vp = vp;
2d3e977e
MD
839 ap.a_flags = flags;
840 ap.a_td = td;
cbe54d63
MD
841
842 DO_OPS(ops, error, &ap, vop_unlock);
843 return(error);
2d3e977e
MD
844}
845
846int
0961aa92
MD
847vop_bmap(struct vop_ops *ops, struct vnode *vp, daddr_t bn, struct vnode **vpp,
848 daddr_t *bnp, int *runp, int *runb)
2d3e977e
MD
849{
850 struct vop_bmap_args ap;
cbe54d63 851 int error;
2d3e977e
MD
852
853 ap.a_head.a_desc = &vop_bmap_desc;
0961aa92 854 ap.a_head.a_ops = ops;
2d3e977e
MD
855 ap.a_vp = vp;
856 ap.a_bn = bn;
857 ap.a_vpp = vpp;
858 ap.a_bnp = bnp;
859 ap.a_runp = runp;
860 ap.a_runb = runb;
cbe54d63
MD
861
862 DO_OPS(ops, error, &ap, vop_bmap);
863 return(error);
2d3e977e
MD
864}
865
866int
0961aa92 867vop_strategy(struct vop_ops *ops, struct vnode *vp, struct buf *bp)
2d3e977e
MD
868{
869 struct vop_strategy_args ap;
cbe54d63 870 int error;
2d3e977e
MD
871
872 ap.a_head.a_desc = &vop_strategy_desc;
0961aa92 873 ap.a_head.a_ops = ops;
2d3e977e
MD
874 ap.a_vp = vp;
875 ap.a_bp = bp;
cbe54d63
MD
876
877 DO_OPS(ops, error, &ap, vop_strategy);
878 return(error);
2d3e977e
MD
879}
880
881int
0961aa92 882vop_print(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
883{
884 struct vop_print_args ap;
cbe54d63 885 int error;
2d3e977e
MD
886
887 ap.a_head.a_desc = &vop_print_desc;
0961aa92 888 ap.a_head.a_ops = ops;
2d3e977e 889 ap.a_vp = vp;
cbe54d63
MD
890
891 DO_OPS(ops, error, &ap, vop_print);
892 return(error);
2d3e977e
MD
893}
894
895int
0961aa92
MD
896vop_pathconf(struct vop_ops *ops, struct vnode *vp, int name,
897 register_t *retval)
2d3e977e
MD
898{
899 struct vop_pathconf_args ap;
cbe54d63 900 int error;
2d3e977e
MD
901
902 ap.a_head.a_desc = &vop_pathconf_desc;
0961aa92 903 ap.a_head.a_ops = ops;
2d3e977e
MD
904 ap.a_vp = vp;
905 ap.a_name = name;
906 ap.a_retval = retval;
cbe54d63
MD
907
908 DO_OPS(ops, error, &ap, vop_pathconf);
909 return(error);
2d3e977e
MD
910}
911
912int
0961aa92
MD
913vop_advlock(struct vop_ops *ops, struct vnode *vp, caddr_t id, int op,
914 struct flock *fl, int flags)
2d3e977e
MD
915{
916 struct vop_advlock_args ap;
cbe54d63 917 int error;
2d3e977e
MD
918
919 ap.a_head.a_desc = &vop_advlock_desc;
0961aa92 920 ap.a_head.a_ops = ops;
2d3e977e
MD
921 ap.a_vp = vp;
922 ap.a_id = id;
923 ap.a_op = op;
924 ap.a_fl = fl;
925 ap.a_flags = flags;
cbe54d63
MD
926
927 DO_OPS(ops, error, &ap, vop_advlock);
928 return(error);
2d3e977e
MD
929}
930
931int
0961aa92
MD
932vop_balloc(struct vop_ops *ops, struct vnode *vp, off_t startoffset,
933 int size, struct ucred *cred, int flags,
934 struct buf **bpp)
2d3e977e
MD
935{
936 struct vop_balloc_args ap;
cbe54d63 937 int error;
2d3e977e
MD
938
939 ap.a_head.a_desc = &vop_balloc_desc;
0961aa92 940 ap.a_head.a_ops = ops;
2d3e977e
MD
941 ap.a_vp = vp;
942 ap.a_startoffset = startoffset;
943 ap.a_size = size;
944 ap.a_cred = cred;
945 ap.a_flags = flags;
946 ap.a_bpp = bpp;
cbe54d63
MD
947
948 DO_OPS(ops, error, &ap, vop_balloc);
949 return(error);
2d3e977e
MD
950}
951
952int
0961aa92
MD
953vop_reallocblks(struct vop_ops *ops, struct vnode *vp,
954 struct cluster_save *buflist)
2d3e977e
MD
955{
956 struct vop_reallocblks_args ap;
cbe54d63 957 int error;
2d3e977e
MD
958
959 ap.a_head.a_desc = &vop_reallocblks_desc;
0961aa92 960 ap.a_head.a_ops = ops;
2d3e977e
MD
961 ap.a_vp = vp;
962 ap.a_buflist = buflist;
cbe54d63
MD
963
964 DO_OPS(ops, error, &ap, vop_reallocblks);
965 return(error);
2d3e977e
MD
966}
967
968int
0961aa92
MD
969vop_getpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
970 int reqpage, vm_ooffset_t offset)
2d3e977e
MD
971{
972 struct vop_getpages_args ap;
cbe54d63 973 int error;
2d3e977e
MD
974
975 ap.a_head.a_desc = &vop_getpages_desc;
0961aa92 976 ap.a_head.a_ops = ops;
2d3e977e
MD
977 ap.a_vp = vp;
978 ap.a_m = m;
979 ap.a_count = count;
980 ap.a_reqpage = reqpage;
981 ap.a_offset = offset;
cbe54d63
MD
982
983 DO_OPS(ops, error, &ap, vop_getpages);
984 return(error);
2d3e977e
MD
985}
986
987int
0961aa92
MD
988vop_putpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
989 int sync, int *rtvals, vm_ooffset_t offset)
2d3e977e
MD
990{
991 struct vop_putpages_args ap;
cbe54d63 992 int error;
2d3e977e
MD
993
994 ap.a_head.a_desc = &vop_putpages_desc;
0961aa92 995 ap.a_head.a_ops = ops;
2d3e977e
MD
996 ap.a_vp = vp;
997 ap.a_m = m;
998 ap.a_count = count;
999 ap.a_sync = sync;
1000 ap.a_rtvals = rtvals;
1001 ap.a_offset = offset;
cbe54d63
MD
1002
1003 DO_OPS(ops, error, &ap, vop_putpages);
1004 return(error);
2d3e977e
MD
1005}
1006
1007int
0961aa92
MD
1008vop_freeblks(struct vop_ops *ops, struct vnode *vp,
1009 daddr_t addr, daddr_t length)
2d3e977e
MD
1010{
1011 struct vop_freeblks_args ap;
cbe54d63 1012 int error;
2d3e977e
MD
1013
1014 ap.a_head.a_desc = &vop_freeblks_desc;
0961aa92 1015 ap.a_head.a_ops = ops;
2d3e977e
MD
1016 ap.a_vp = vp;
1017 ap.a_addr = addr;
1018 ap.a_length = length;
cbe54d63
MD
1019
1020 DO_OPS(ops, error, &ap, vop_freeblks);
1021 return(error);
2d3e977e
MD
1022}
1023
1024int
0961aa92 1025vop_bwrite(struct vop_ops *ops, struct vnode *vp, struct buf *bp)
2d3e977e
MD
1026{
1027 struct vop_bwrite_args ap;
cbe54d63 1028 int error;
2d3e977e
MD
1029
1030 ap.a_head.a_desc = &vop_bwrite_desc;
0961aa92 1031 ap.a_head.a_ops = ops;
2d3e977e
MD
1032 ap.a_vp = vp;
1033 ap.a_bp = bp;
cbe54d63
MD
1034
1035 DO_OPS(ops, error, &ap, vop_bwrite);
1036 return(error);
2d3e977e
MD
1037}
1038
1039int
0961aa92
MD
1040vop_getacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1041 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1042{
1043 struct vop_getacl_args ap;
cbe54d63 1044 int error;
2d3e977e
MD
1045
1046 ap.a_head.a_desc = &vop_getacl_desc;
0961aa92 1047 ap.a_head.a_ops = ops;
2d3e977e
MD
1048 ap.a_vp = vp;
1049 ap.a_type = type;
1050 ap.a_aclp = aclp;
1051 ap.a_cred = cred;
1052 ap.a_td = td;
cbe54d63
MD
1053
1054 DO_OPS(ops, error, &ap, vop_getacl);
1055 return(error);
2d3e977e
MD
1056}
1057
1058int
0961aa92
MD
1059vop_setacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1060 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1061{
1062 struct vop_setacl_args ap;
cbe54d63 1063 int error;
2d3e977e
MD
1064
1065 ap.a_head.a_desc = &vop_setacl_desc;
0961aa92 1066 ap.a_head.a_ops = ops;
2d3e977e
MD
1067 ap.a_vp = vp;
1068 ap.a_type = type;
1069 ap.a_aclp = aclp;
1070 ap.a_cred = cred;
1071 ap.a_td = td;
cbe54d63
MD
1072
1073 DO_OPS(ops, error, &ap, vop_setacl);
1074 return(error);
2d3e977e
MD
1075}
1076
1077int
0961aa92
MD
1078vop_aclcheck(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1079 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1080{
1081 struct vop_aclcheck_args ap;
cbe54d63 1082 int error;
2d3e977e
MD
1083
1084 ap.a_head.a_desc = &vop_aclcheck_desc;
0961aa92 1085 ap.a_head.a_ops = ops;
2d3e977e
MD
1086 ap.a_vp = vp;
1087 ap.a_type = type;
1088 ap.a_aclp = aclp;
1089 ap.a_cred = cred;
1090 ap.a_td = td;
cbe54d63
MD
1091
1092 DO_OPS(ops, error, &ap, vop_aclcheck);
1093 return(error);
2d3e977e
MD
1094}
1095
1096int
0961aa92
MD
1097vop_getextattr(struct vop_ops *ops, struct vnode *vp, char *name,
1098 struct uio *uio, struct ucred *cred, struct thread *td)
2d3e977e
MD
1099{
1100 struct vop_getextattr_args ap;
cbe54d63 1101 int error;
2d3e977e
MD
1102
1103 ap.a_head.a_desc = &vop_getextattr_desc;
0961aa92 1104 ap.a_head.a_ops = ops;
2d3e977e
MD
1105 ap.a_vp = vp;
1106 ap.a_name = name;
1107 ap.a_uio = uio;
1108 ap.a_cred = cred;
1109 ap.a_td = td;
cbe54d63
MD
1110
1111 DO_OPS(ops, error, &ap, vop_getextattr);
1112 return(error);
2d3e977e
MD
1113}
1114
1115int
0961aa92
MD
1116vop_setextattr(struct vop_ops *ops, struct vnode *vp, char *name,
1117 struct uio *uio, struct ucred *cred, struct thread *td)
2d3e977e
MD
1118{
1119 struct vop_setextattr_args ap;
cbe54d63 1120 int error;
2d3e977e
MD
1121
1122 ap.a_head.a_desc = &vop_setextattr_desc;
0961aa92 1123 ap.a_head.a_ops = ops;
2d3e977e
MD
1124 ap.a_vp = vp;
1125 ap.a_name = name;
1126 ap.a_uio = uio;
1127 ap.a_cred = cred;
1128 ap.a_td = td;
cbe54d63
MD
1129
1130 DO_OPS(ops, error, &ap, vop_setextattr);
1131 return(error);
2d3e977e
MD
1132}
1133
1134int
0961aa92 1135vop_createvobject(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
1136{
1137 struct vop_createvobject_args ap;
cbe54d63 1138 int error;
2d3e977e
MD
1139
1140 ap.a_head.a_desc = &vop_createvobject_desc;
0961aa92 1141 ap.a_head.a_ops = ops;
2d3e977e
MD
1142 ap.a_vp = vp;
1143 ap.a_td = td;
cbe54d63
MD
1144
1145 DO_OPS(ops, error, &ap, vop_createvobject);
1146 return(error);
2d3e977e
MD
1147}
1148
1149int
0961aa92 1150vop_destroyvobject(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
1151{
1152 struct vop_destroyvobject_args ap;
cbe54d63 1153 int error;
2d3e977e
MD
1154
1155 ap.a_head.a_desc = &vop_destroyvobject_desc;
0961aa92 1156 ap.a_head.a_ops = ops;
2d3e977e 1157 ap.a_vp = vp;
cbe54d63
MD
1158
1159 DO_OPS(ops, error, &ap, vop_destroyvobject);
1160 return(error);
2d3e977e
MD
1161}
1162
1163int
0961aa92 1164vop_getvobject(struct vop_ops *ops, struct vnode *vp, struct vm_object **objpp)
2d3e977e
MD
1165{
1166 struct vop_getvobject_args ap;
cbe54d63 1167 int error;
2d3e977e
MD
1168
1169 ap.a_head.a_desc = &vop_getvobject_desc;
0961aa92 1170 ap.a_head.a_ops = ops;
2d3e977e
MD
1171 ap.a_vp = vp;
1172 ap.a_objpp = objpp;
cbe54d63
MD
1173
1174 DO_OPS(ops, error, &ap, vop_getvobject);
1175 return(error);
1176}
1177
1178int
1179vop_vfsset(struct vop_ops *ops, int op, const char *opstr)
1180{
1181 struct vop_vfsset_args ap;
1182 int error;
1183
1184 ap.a_head.a_desc = &vop_vfsset_desc;
1185 ap.a_head.a_ops = ops;
1186 ap.a_op = op;
1187 ap.a_opstr = opstr;
1188
1189 DO_OPS(ops, error, &ap, vop_vfsset);
1190 return(error);
0961aa92
MD
1191}
1192
fad57d0e
MD
1193/*
1194 * NEW API FUNCTIONS
1195 *
1196 * nresolve takes a locked ncp and a cred and resolves the ncp into a
1197 * positive or negative hit.
1198 *
1199 * The namecache is automatically adjusted by this function. The ncp
1200 * is left locked on return.
1201 */
1202int
1203vop_nresolve(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1204{
1205 struct vop_nresolve_args ap;
1206 int error;
1207
1208 ap.a_head.a_desc = &vop_nresolve_desc;
1209 ap.a_head.a_ops = ops;
1210 ap.a_ncp = ncp;
1211 ap.a_cred = cred;
1212
1213 DO_OPS(ops, error, &ap, vop_nresolve);
1214 return(error);
1215}
1216
1217/*
1218 * nlookupdotdot takes an unlocked directory, dvp, and looks up "..", returning
1219 * a locked parent directory in *vpp. If an error occurs *vpp will be NULL.
1220 */
1221int
1222vop_nlookupdotdot(struct vop_ops *ops, struct vnode *dvp,
1223 struct vnode **vpp, struct ucred *cred)
1224{
1225 struct vop_nlookupdotdot_args ap;
1226 int error;
1227
1228 ap.a_head.a_desc = &vop_nlookupdotdot_desc;
1229 ap.a_head.a_ops = ops;
1230 ap.a_dvp = dvp;
1231 ap.a_vpp = vpp;
1232 ap.a_cred = cred;
1233
1234 DO_OPS(ops, error, &ap, vop_nlookupdotdot);
1235 return(error);
1236}
1237
1238/*
1239 * ncreate takes a locked, resolved ncp that typically represents a negative
1240 * cache hit and creates the file or node specified by the ncp, cred, and
1241 * vattr. If no error occurs a locked vnode is returned in *vpp.
1242 *
1243 * The namecache is automatically adjusted by this function. The ncp
1244 * is left locked on return.
1245 */
1246int
1247vop_ncreate(struct vop_ops *ops, struct namecache *ncp,
1248 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1249{
1250 struct vop_ncreate_args ap;
1251 int error;
1252
1253 ap.a_head.a_desc = &vop_ncreate_desc;
1254 ap.a_head.a_ops = ops;
1255 ap.a_ncp = ncp;
1256 ap.a_vpp = vpp;
1257 ap.a_cred = cred;
1258 ap.a_vap = vap;
1259
1260 DO_OPS(ops, error, &ap, vop_ncreate);
1261 return(error);
1262}
1263
1264/*
1265 * nmkdir takes a locked, resolved ncp that typically represents a negative
1266 * cache hit and creates the directory specified by the ncp, cred, and
1267 * vattr. If no error occurs a locked vnode is returned in *vpp.
1268 *
1269 * The namecache is automatically adjusted by this function. The ncp
1270 * is left locked on return.
1271 */
1272int
1273vop_nmkdir(struct vop_ops *ops, struct namecache *ncp,
1274 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1275{
1276 struct vop_nmkdir_args ap;
1277 int error;
1278
1279 ap.a_head.a_desc = &vop_nmkdir_desc;
1280 ap.a_head.a_ops = ops;
1281 ap.a_ncp = ncp;
1282 ap.a_vpp = vpp;
1283 ap.a_cred = cred;
1284 ap.a_vap = vap;
1285
1286 DO_OPS(ops, error, &ap, vop_nmkdir);
1287 return(error);
1288}
1289
1290/*
1291 * nmknod takes a locked, resolved ncp that typically represents a negative
1292 * cache hit and creates the node specified by the ncp, cred, and
1293 * vattr. If no error occurs a locked vnode is returned in *vpp.
1294 *
1295 * The namecache is automatically adjusted by this function. The ncp
1296 * is left locked on return.
1297 */
1298int
1299vop_nmknod(struct vop_ops *ops, struct namecache *ncp,
1300 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1301{
1302 struct vop_nmknod_args ap;
1303 int error;
1304
1305 ap.a_head.a_desc = &vop_nmknod_desc;
1306 ap.a_head.a_ops = ops;
1307 ap.a_ncp = ncp;
1308 ap.a_vpp = vpp;
1309 ap.a_cred = cred;
1310 ap.a_vap = vap;
1311
1312 DO_OPS(ops, error, &ap, vop_nmknod);
1313 return(error);
1314}
1315
1316/*
1317 * nlink takes a locked, resolved ncp that typically represents a negative
1318 * cache hit and creates the node specified by the ncp, cred, and
1319 * existing vnode. The passed vp must be locked and will remain locked
1320 * on return, as does the ncp, whether an error occurs or not.
1321 *
1322 * The namecache is automatically adjusted by this function. The ncp
1323 * is left locked on return.
1324 */
1325int
1326vop_nlink(struct vop_ops *ops, struct namecache *ncp,
1327 struct vnode *vp, struct ucred *cred)
1328{
1329 struct vop_nlink_args ap;
1330 int error;
1331
1332 ap.a_head.a_desc = &vop_nlink_desc;
1333 ap.a_head.a_ops = ops;
1334 ap.a_ncp = ncp;
1335 ap.a_vp = vp;
1336 ap.a_cred = cred;
1337
1338 DO_OPS(ops, error, &ap, vop_nlink);
1339 return(error);
1340}
1341
1342/*
1343 * nsymlink takes a locked, resolved ncp that typically represents a negative
1344 * cache hit and creates a symbolic link based on cred, vap, and target (the
1345 * contents of the link). If no error occurs a locked vnode is returned in
1346 * *vpp.
1347 *
1348 * The namecache is automatically adjusted by this function. The ncp
1349 * is left locked on return.
1350 */
1351int
1352vop_nsymlink(struct vop_ops *ops, struct namecache *ncp,
1353 struct vnode **vpp, struct ucred *cred,
1354 struct vattr *vap, char *target)
1355{
1356 struct vop_nsymlink_args ap;
1357 int error;
1358
1359 ap.a_head.a_desc = &vop_nsymlink_desc;
1360 ap.a_head.a_ops = ops;
1361 ap.a_ncp = ncp;
1362 ap.a_vpp = vpp;
1363 ap.a_cred = cred;
1364 ap.a_vap = vap;
1365 ap.a_target = target;
1366
1367 DO_OPS(ops, error, &ap, vop_nsymlink);
1368 return(error);
1369}
1370
1371/*
1372 * nwhiteout takes a locked, resolved ncp that can represent a positive or
1373 * negative hit and executes the whiteout function specified in flags.
1374 *
1375 * The namecache is automatically adjusted by this function. The ncp
1376 * is left locked on return.
1377 */
1378int
1379vop_nwhiteout(struct vop_ops *ops, struct namecache *ncp,
1380 struct ucred *cred, int flags)
1381{
1382 struct vop_nwhiteout_args ap;
1383 int error;
1384
1385 ap.a_head.a_desc = &vop_nwhiteout_desc;
1386 ap.a_head.a_ops = ops;
1387 ap.a_ncp = ncp;
1388 ap.a_cred = cred;
1389 ap.a_flags = flags;
1390
1391 DO_OPS(ops, error, &ap, vop_nwhiteout);
1392 return(error);
1393}
1394
1395/*
1396 * nremove takes a locked, resolved ncp that generally represents a
1397 * positive hit and removes the file.
1398 *
1399 * The namecache is automatically adjusted by this function. The ncp
1400 * is left locked on return.
1401 */
1402int
1403vop_nremove(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1404{
1405 struct vop_nremove_args ap;
1406 int error;
1407
1408 ap.a_head.a_desc = &vop_nremove_desc;
1409 ap.a_head.a_ops = ops;
1410 ap.a_ncp = ncp;
1411 ap.a_cred = cred;
1412
1413 DO_OPS(ops, error, &ap, vop_nremove);
1414 return(error);
1415}
1416
1417/*
1418 * nrmdir takes a locked, resolved ncp that generally represents a
1419 * directory and removes the directory.
1420 *
1421 * The namecache is automatically adjusted by this function. The ncp
1422 * is left locked on return.
1423 */
1424int
1425vop_nrmdir(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1426{
1427 struct vop_nrmdir_args ap;
1428 int error;
1429
1430 ap.a_head.a_desc = &vop_nrmdir_desc;
1431 ap.a_head.a_ops = ops;
1432 ap.a_ncp = ncp;
1433 ap.a_cred = cred;
1434
1435 DO_OPS(ops, error, &ap, vop_nrmdir);
1436 return(error);
1437}
1438
1439/*
1440 * nrename takes TWO locked, resolved ncp's and the cred of the caller
1441 * and renames the source ncp to the target ncp. The target ncp may
1442 * represent a positive or negative hit.
1443 *
1444 * The namecache is automatically adjusted by this function. The ncp
1445 * is left locked on return. The source ncp is typically changed to
1446 * a negative cache hit and the target ncp typically takes on the
1447 * source ncp's underlying file.
1448 */
1449int
1450vop_nrename(struct vop_ops *ops, struct namecache *fncp,
1451 struct namecache *tncp, struct ucred *cred)
1452{
1453 struct vop_nrename_args ap;
1454 int error;
1455
1456 ap.a_head.a_desc = &vop_nrename_desc;
1457 ap.a_head.a_ops = ops;
1458 ap.a_fncp = fncp;
1459 ap.a_tncp = tncp;
1460 ap.a_cred = cred;
1461
1462 DO_OPS(ops, error, &ap, vop_nrename);
1463 return(error);
1464}
1465
0961aa92
MD
1466/************************************************************************
1467 * PRIMARY VNODE OPERATIONS FORWARDING CALLS *
1468 ************************************************************************
1469 *
1470 * These procedures are called from VFSs such as unionfs and nullfs
1471 * when they wish to forward an operation on one VFS to another. The
1472 * argument structure/message is modified and then directly passed to the
1473 * appropriate routine. This routines may also be called by initiators
1474 * who have an argument structure in hand rather then discreet arguments.
1475 */
1476int
1477vop_vnoperate_ap(struct vop_generic_args *ap)
1478{
cbe54d63
MD
1479 struct vop_ops *ops;
1480 int error;
1481
1482 ops = ap->a_ops;
6ddb7618
MD
1483 error = VOCALL(ops, ap);
1484
1485 return (error);
1486}
1487
1488/*
1489 * This routine is called by the cache coherency layer to execute the actual
1490 * VFS operation. If a journaling layer is present we call though it, else
1491 * we call the native VOP functions.
1492 */
1493int
1494vop_cache_operate_ap(struct vop_generic_args *ap)
1495{
1496 struct vop_ops *ops;
1497 int error;
1498
1499 ops = ap->a_ops;
1500 if (ops->vv_mount->mnt_vn_journal_ops)
1501 error = VOCALL(ops->vv_mount->mnt_vn_journal_ops, ap);
1502 else
1503 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1504 return (error);
1505}
1506
1507
1508/*
1509 * This routine is called by the journaling layer to execute the actual
1510 * VFS operation.
1511 */
1512int
1513vop_journal_operate_ap(struct vop_generic_args *ap)
1514{
1515 struct vop_ops *ops;
1516 int error;
1517
1518 ops = ap->a_ops;
1519 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1520
cbe54d63 1521 return (error);
0961aa92
MD
1522}
1523
1524int
1525vop_islocked_ap(struct vop_islocked_args *ap)
1526{
cbe54d63
MD
1527 int error;
1528
1529 DO_OPS(ap->a_head.a_ops, error, ap, vop_islocked);
1530 return(error);
0961aa92
MD
1531}
1532
1533int
1534vop_lookup_ap(struct vop_lookup_args *ap)
1535{
cbe54d63
MD
1536 int error;
1537
1538 DO_OPS(ap->a_head.a_ops, error, ap, vop_lookup);
1539 return(error);
0961aa92
MD
1540}
1541
0961aa92
MD
1542int
1543vop_create_ap(struct vop_create_args *ap)
1544{
cbe54d63
MD
1545 int error;
1546
1547 DO_OPS(ap->a_head.a_ops, error, ap, vop_create);
1548 return(error);
0961aa92
MD
1549}
1550
1551int
1552vop_whiteout_ap(struct vop_whiteout_args *ap)
1553{
cbe54d63
MD
1554 int error;
1555
1556 DO_OPS(ap->a_head.a_ops, error, ap, vop_whiteout);
1557 return(error);
0961aa92
MD
1558}
1559
1560int
1561vop_mknod_ap(struct vop_mknod_args *ap)
1562{
cbe54d63
MD
1563 int error;
1564
1565 DO_OPS(ap->a_head.a_ops, error, ap, vop_mknod);
1566 return(error);
0961aa92
MD
1567}
1568
1569int
1570vop_open_ap(struct vop_open_args *ap)
1571{
cbe54d63
MD
1572 int error;
1573
1574 DO_OPS(ap->a_head.a_ops, error, ap, vop_open);
1575 return(error);
0961aa92
MD
1576}
1577
1578int
1579vop_close_ap(struct vop_close_args *ap)
1580{
cbe54d63
MD
1581 int error;
1582
1583 DO_OPS(ap->a_head.a_ops, error, ap, vop_close);
1584 return(error);
0961aa92
MD
1585}
1586
1587int
1588vop_access_ap(struct vop_access_args *ap)
1589{
cbe54d63
MD
1590 int error;
1591
1592 DO_OPS(ap->a_head.a_ops, error, ap, vop_access);
1593 return(error);
0961aa92
MD
1594}
1595
1596int
1597vop_getattr_ap(struct vop_getattr_args *ap)
1598{
cbe54d63
MD
1599 int error;
1600
1601 DO_OPS(ap->a_head.a_ops, error, ap, vop_getattr);
1602 return(error);
0961aa92
MD
1603}
1604
1605int
1606vop_setattr_ap(struct vop_setattr_args *ap)
1607{
cbe54d63
MD
1608 int error;
1609
1610 DO_OPS(ap->a_head.a_ops, error, ap, vop_setattr);
1611 return(error);
0961aa92
MD
1612}
1613
1614int
1615vop_read_ap(struct vop_read_args *ap)
1616{
cbe54d63
MD
1617 int error;
1618
1619 DO_OPS(ap->a_head.a_ops, error, ap, vop_read);
1620 return(error);
0961aa92
MD
1621}
1622
1623int
1624vop_write_ap(struct vop_write_args *ap)
1625{
cbe54d63
MD
1626 int error;
1627
1628 DO_OPS(ap->a_head.a_ops, error, ap, vop_write);
1629 return(error);
0961aa92
MD
1630}
1631
1632int
1633vop_lease_ap(struct vop_lease_args *ap)
1634{
cbe54d63
MD
1635 int error;
1636
1637 DO_OPS(ap->a_head.a_ops, error, ap, vop_lease);
1638 return(error);
0961aa92
MD
1639}
1640
1641int
1642vop_ioctl_ap(struct vop_ioctl_args *ap)
1643{
cbe54d63
MD
1644 int error;
1645
1646 DO_OPS(ap->a_head.a_ops, error, ap, vop_ioctl);
1647 return(error);
0961aa92
MD
1648}
1649
1650int
1651vop_poll_ap(struct vop_poll_args *ap)
1652{
cbe54d63
MD
1653 int error;
1654
1655 DO_OPS(ap->a_head.a_ops, error, ap, vop_poll);
1656 return(error);
0961aa92
MD
1657}
1658
1659int
1660vop_kqfilter_ap(struct vop_kqfilter_args *ap)
1661{
cbe54d63
MD
1662 int error;
1663
1664 DO_OPS(ap->a_head.a_ops, error, ap, vop_kqfilter);
1665 return(error);
0961aa92
MD
1666}
1667
1668int
1669vop_revoke_ap(struct vop_revoke_args *ap)
1670{
cbe54d63
MD
1671 int error;
1672
1673 DO_OPS(ap->a_head.a_ops, error, ap, vop_revoke);
1674 return(error);
0961aa92
MD
1675}
1676
1677int
1678vop_mmap_ap(struct vop_mmap_args *ap)
1679{
cbe54d63
MD
1680 int error;
1681
1682 DO_OPS(ap->a_head.a_ops, error, ap, vop_mmap);
1683 return(error);
0961aa92
MD
1684}
1685
1686int
1687vop_fsync_ap(struct vop_fsync_args *ap)
1688{
cbe54d63
MD
1689 int error;
1690
1691 DO_OPS(ap->a_head.a_ops, error, ap, vop_fsync);
1692 return(error);
0961aa92
MD
1693}
1694
1695int
1696vop_remove_ap(struct vop_remove_args *ap)
1697{
cbe54d63
MD
1698 int error;
1699
1700 DO_OPS(ap->a_head.a_ops, error, ap, vop_remove);
1701 return(error);
0961aa92
MD
1702}
1703
1704int
1705vop_link_ap(struct vop_link_args *ap)
1706{
cbe54d63
MD
1707 int error;
1708
1709 DO_OPS(ap->a_head.a_ops, error, ap, vop_link);
1710 return(error);
0961aa92
MD
1711}
1712
1713int
1714vop_rename_ap(struct vop_rename_args *ap)
1715{
cbe54d63
MD
1716 int error;
1717
1718 DO_OPS(ap->a_head.a_ops, error, ap, vop_rename);
1719 return(error);
0961aa92
MD
1720}
1721
1722int
1723vop_mkdir_ap(struct vop_mkdir_args *ap)
1724{
cbe54d63
MD
1725 int error;
1726
1727 DO_OPS(ap->a_head.a_ops, error, ap, vop_mkdir);
1728 return(error);
0961aa92
MD
1729}
1730
1731int
1732vop_rmdir_ap(struct vop_rmdir_args *ap)
1733{
cbe54d63
MD
1734 int error;
1735
1736 DO_OPS(ap->a_head.a_ops, error, ap, vop_rmdir);
1737 return(error);
0961aa92
MD
1738}
1739
1740int
1741vop_symlink_ap(struct vop_symlink_args *ap)
1742{
cbe54d63
MD
1743 int error;
1744
1745 DO_OPS(ap->a_head.a_ops, error, ap, vop_symlink);
1746 return(error);
0961aa92
MD
1747}
1748
1749int
1750vop_readdir_ap(struct vop_readdir_args *ap)
1751{
cbe54d63
MD
1752 int error;
1753
1754 DO_OPS(ap->a_head.a_ops, error, ap, vop_readdir);
1755 return(error);
0961aa92
MD
1756}
1757
1758int
1759vop_readlink_ap(struct vop_readlink_args *ap)
1760{
cbe54d63
MD
1761 int error;
1762
1763 DO_OPS(ap->a_head.a_ops, error, ap, vop_readlink);
1764 return(error);
0961aa92
MD
1765}
1766
1767int
1768vop_inactive_ap(struct vop_inactive_args *ap)
1769{
cbe54d63
MD
1770 int error;
1771
1772 DO_OPS(ap->a_head.a_ops, error, ap, vop_inactive);
1773 return(error);
0961aa92
MD
1774}
1775
1776int
1777vop_reclaim_ap(struct vop_reclaim_args *ap)
1778{
cbe54d63
MD
1779 int error;
1780
1781 DO_OPS(ap->a_head.a_ops, error, ap, vop_reclaim);
1782 return(error);
0961aa92
MD
1783}
1784
1785int
1786vop_lock_ap(struct vop_lock_args *ap)
1787{
cbe54d63
MD
1788 int error;
1789
1790 DO_OPS(ap->a_head.a_ops, error, ap, vop_lock);
1791 return(error);
0961aa92
MD
1792}
1793
1794int
1795vop_unlock_ap(struct vop_unlock_args *ap)
1796{
cbe54d63
MD
1797 int error;
1798
1799 DO_OPS(ap->a_head.a_ops, error, ap, vop_unlock);
1800 return(error);
0961aa92
MD
1801}
1802
1803int
1804vop_bmap_ap(struct vop_bmap_args *ap)
1805{
cbe54d63
MD
1806 int error;
1807
1808 DO_OPS(ap->a_head.a_ops, error, ap, vop_bmap);
1809 return(error);
0961aa92
MD
1810}
1811
1812int
1813vop_strategy_ap(struct vop_strategy_args *ap)
1814{
cbe54d63
MD
1815 int error;
1816
1817 DO_OPS(ap->a_head.a_ops, error, ap, vop_strategy);
1818 return(error);
0961aa92
MD
1819}
1820
1821int
1822vop_print_ap(struct vop_print_args *ap)
1823{
cbe54d63
MD
1824 int error;
1825
1826 DO_OPS(ap->a_head.a_ops, error, ap, vop_print);
1827 return(error);
0961aa92
MD
1828}
1829
1830int
1831vop_pathconf_ap(struct vop_pathconf_args *ap)
1832{
cbe54d63
MD
1833 int error;
1834
1835 DO_OPS(ap->a_head.a_ops, error, ap, vop_pathconf);
1836 return(error);
0961aa92
MD
1837}
1838
1839int
1840vop_advlock_ap(struct vop_advlock_args *ap)
1841{
cbe54d63
MD
1842 int error;
1843
1844 DO_OPS(ap->a_head.a_ops, error, ap, vop_advlock);
1845 return(error);
0961aa92
MD
1846}
1847
1848int
1849vop_balloc_ap(struct vop_balloc_args *ap)
1850{
cbe54d63
MD
1851 int error;
1852
1853 DO_OPS(ap->a_head.a_ops, error, ap, vop_balloc);
1854 return(error);
0961aa92
MD
1855}
1856
1857int
1858vop_reallocblks_ap(struct vop_reallocblks_args *ap)
1859{
cbe54d63
MD
1860 int error;
1861
1862 DO_OPS(ap->a_head.a_ops, error, ap, vop_reallocblks);
1863 return(error);
0961aa92
MD
1864}
1865
1866int
1867vop_getpages_ap(struct vop_getpages_args *ap)
1868{
cbe54d63
MD
1869 int error;
1870
1871 DO_OPS(ap->a_head.a_ops, error, ap, vop_getpages);
1872 return(error);
0961aa92
MD
1873}
1874
1875int
1876vop_putpages_ap(struct vop_putpages_args *ap)
1877{
cbe54d63
MD
1878 int error;
1879
1880 DO_OPS(ap->a_head.a_ops, error, ap, vop_putpages);
1881 return(error);
0961aa92
MD
1882}
1883
1884int
1885vop_freeblks_ap(struct vop_freeblks_args *ap)
1886{
cbe54d63
MD
1887 int error;
1888
1889 DO_OPS(ap->a_head.a_ops, error, ap, vop_freeblks);
1890 return(error);
0961aa92
MD
1891}
1892
1893int
1894vop_bwrite_ap(struct vop_bwrite_args *ap)
1895{
cbe54d63
MD
1896 int error;
1897
1898 DO_OPS(ap->a_head.a_ops, error, ap, vop_bwrite);
1899 return(error);
0961aa92
MD
1900}
1901
1902int
1903vop_getacl_ap(struct vop_getacl_args *ap)
1904{
cbe54d63
MD
1905 int error;
1906
1907 DO_OPS(ap->a_head.a_ops, error, ap, vop_getacl);
1908 return(error);
0961aa92
MD
1909}
1910
1911int
1912vop_setacl_ap(struct vop_setacl_args *ap)
1913{
cbe54d63
MD
1914 int error;
1915
1916 DO_OPS(ap->a_head.a_ops, error, ap, vop_setacl);
1917 return(error);
0961aa92
MD
1918}
1919
1920int
1921vop_aclcheck_ap(struct vop_aclcheck_args *ap)
1922{
cbe54d63
MD
1923 int error;
1924
1925 DO_OPS(ap->a_head.a_ops, error, ap, vop_aclcheck);
1926 return(error);
0961aa92
MD
1927}
1928
1929int
1930vop_getextattr_ap(struct vop_getextattr_args *ap)
1931{
cbe54d63
MD
1932 int error;
1933
1934 DO_OPS(ap->a_head.a_ops, error, ap, vop_getextattr);
1935 return(error);
0961aa92
MD
1936}
1937
1938int
1939vop_setextattr_ap(struct vop_setextattr_args *ap)
1940{
cbe54d63
MD
1941 int error;
1942
1943 DO_OPS(ap->a_head.a_ops, error, ap, vop_setextattr);
1944 return(error);
0961aa92
MD
1945}
1946
1947int
1948vop_createvobject_ap(struct vop_createvobject_args *ap)
1949{
cbe54d63
MD
1950 int error;
1951
1952 DO_OPS(ap->a_head.a_ops, error, ap, vop_createvobject);
1953 return(error);
0961aa92
MD
1954}
1955
1956int
1957vop_destroyvobject_ap(struct vop_destroyvobject_args *ap)
1958{
cbe54d63
MD
1959 int error;
1960
1961 DO_OPS(ap->a_head.a_ops, error, ap, vop_destroyvobject);
1962 return(error);
0961aa92
MD
1963}
1964
1965int
1966vop_getvobject_ap(struct vop_getvobject_args *ap)
1967{
cbe54d63
MD
1968 int error;
1969
1970 DO_OPS(ap->a_head.a_ops, error, ap, vop_getvobject);
1971 return(error);
1972}
1973
1974int
1975vop_vfsset_ap(struct vop_vfsset_args *ap)
1976{
1977 int error;
1978
1979 DO_OPS(ap->a_head.a_ops, error, ap, vop_vfsset);
1980 return(error);
2d3e977e
MD
1981}
1982
fad57d0e
MD
1983int
1984vop_nresolve_ap(struct vop_nresolve_args *ap)
1985{
1986 int error;
1987
1988 DO_OPS(ap->a_head.a_ops, error, ap, vop_nresolve);
1989 return(error);
1990}
1991
1992int
1993vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args *ap)
1994{
1995 int error;
1996
1997 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlookupdotdot);
1998 return(error);
1999}
2000
2001int
2002vop_ncreate_ap(struct vop_ncreate_args *ap)
2003{
2004 int error;
2005
2006 DO_OPS(ap->a_head.a_ops, error, ap, vop_ncreate);
2007 return(error);
2008}
2009
2010int
2011vop_nmkdir_ap(struct vop_nmkdir_args *ap)
2012{
2013 int error;
2014
2015 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmkdir);
2016 return(error);
2017}
2018
2019int
2020vop_nmknod_ap(struct vop_nmknod_args *ap)
2021{
2022 int error;
2023
2024 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmknod);
2025 return(error);
2026}
2027
2028int
2029vop_nlink_ap(struct vop_nlink_args *ap)
2030{
2031 int error;
2032
2033 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlink);
2034 return(error);
2035}
2036
2037int
2038vop_nsymlink_ap(struct vop_nsymlink_args *ap)
2039{
2040 int error;
2041
2042 DO_OPS(ap->a_head.a_ops, error, ap, vop_nsymlink);
2043 return(error);
2044}
2045
2046int
2047vop_nwhiteout_ap(struct vop_nwhiteout_args *ap)
2048{
2049 int error;
2050
2051 DO_OPS(ap->a_head.a_ops, error, ap, vop_nwhiteout);
2052 return(error);
2053}
2054
2055int
2056vop_nremove_ap(struct vop_nremove_args *ap)
2057{
2058 int error;
2059
2060 DO_OPS(ap->a_head.a_ops, error, ap, vop_nremove);
2061 return(error);
2062}
2063
2064int
2065vop_nrmdir_ap(struct vop_nrmdir_args *ap)
2066{
2067 int error;
2068
2069 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrmdir);
2070 return(error);
2071}
2072
2073int
2074vop_nrename_ap(struct vop_nrename_args *ap)
2075{
2076 int error;
2077
2078 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrename);
2079 return(error);
2080}
2081