Cleanup minor syntax/informational issues.
[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 *
7d15906a 35 * $DragonFly: src/sys/kern/vfs_vopops.c,v 1.14 2005/08/25 18:34:14 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);
949ecb9b 282VNODEOP_DESC_INIT_SIMPLE(mountctl);
cbe54d63 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);
7d15906a
MD
477 if (error == 0)
478 cache_update_fsmid_vp(vp);
cbe54d63 479 return(error);
2d3e977e
MD
480}
481
482int
0961aa92
MD
483vop_read(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
484 struct ucred *cred)
2d3e977e
MD
485{
486 struct vop_read_args ap;
cbe54d63 487 int error;
2d3e977e
MD
488
489 ap.a_head.a_desc = &vop_read_desc;
0961aa92 490 ap.a_head.a_ops = ops;
2d3e977e
MD
491 ap.a_vp = vp;
492 ap.a_uio = uio;
493 ap.a_ioflag = ioflag;
494 ap.a_cred = cred;
cbe54d63
MD
495
496 DO_OPS(ops, error, &ap, vop_read);
497 return(error);
2d3e977e
MD
498}
499
500int
0961aa92
MD
501vop_write(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
502 struct ucred *cred)
2d3e977e
MD
503{
504 struct vop_write_args ap;
cbe54d63 505 int error;
2d3e977e
MD
506
507 ap.a_head.a_desc = &vop_write_desc;
0961aa92 508 ap.a_head.a_ops = ops;
2d3e977e
MD
509 ap.a_vp = vp;
510 ap.a_uio = uio;
511 ap.a_ioflag = ioflag;
512 ap.a_cred = cred;
cbe54d63
MD
513
514 DO_OPS(ops, error, &ap, vop_write);
7d15906a
MD
515 if (error == 0)
516 cache_update_fsmid_vp(vp);
cbe54d63 517 return(error);
2d3e977e
MD
518}
519
520int
0961aa92
MD
521vop_lease(struct vop_ops *ops, struct vnode *vp, struct thread *td,
522 struct ucred *cred, int flag)
2d3e977e
MD
523{
524 struct vop_lease_args ap;
cbe54d63 525 int error;
2d3e977e
MD
526
527 ap.a_head.a_desc = &vop_lease_desc;
0961aa92 528 ap.a_head.a_ops = ops;
2d3e977e
MD
529 ap.a_vp = vp;
530 ap.a_td = td;
531 ap.a_cred = cred;
532 ap.a_flag = flag;
cbe54d63
MD
533
534 DO_OPS(ops, error, &ap, vop_lease);
535 return(error);
2d3e977e
MD
536}
537
538int
0961aa92
MD
539vop_ioctl(struct vop_ops *ops, struct vnode *vp, u_long command, caddr_t data,
540 int fflag, struct ucred *cred,
541 struct thread *td)
2d3e977e
MD
542{
543 struct vop_ioctl_args ap;
cbe54d63 544 int error;
2d3e977e
MD
545
546 ap.a_head.a_desc = &vop_ioctl_desc;
0961aa92 547 ap.a_head.a_ops = ops;
2d3e977e
MD
548 ap.a_vp = vp;
549 ap.a_command = command;
550 ap.a_data = data;
551 ap.a_fflag = fflag;
552 ap.a_cred = cred;
553 ap.a_td = td;
cbe54d63
MD
554
555 DO_OPS(ops, error, &ap, vop_ioctl);
556 return(error);
2d3e977e
MD
557}
558
559int
0961aa92
MD
560vop_poll(struct vop_ops *ops, struct vnode *vp, int events, struct ucred *cred,
561 struct thread *td)
2d3e977e
MD
562{
563 struct vop_poll_args ap;
cbe54d63 564 int error;
2d3e977e
MD
565
566 ap.a_head.a_desc = &vop_poll_desc;
0961aa92 567 ap.a_head.a_ops = ops;
2d3e977e
MD
568 ap.a_vp = vp;
569 ap.a_events = events;
570 ap.a_cred = cred;
571 ap.a_td = td;
cbe54d63
MD
572
573 DO_OPS(ops, error, &ap, vop_poll);
574 return(error);
2d3e977e
MD
575}
576
577int
0961aa92 578vop_kqfilter(struct vop_ops *ops, struct vnode *vp, struct knote *kn)
2d3e977e
MD
579{
580 struct vop_kqfilter_args ap;
cbe54d63 581 int error;
2d3e977e
MD
582
583 ap.a_head.a_desc = &vop_kqfilter_desc;
0961aa92 584 ap.a_head.a_ops = ops;
2d3e977e
MD
585 ap.a_vp = vp;
586 ap.a_kn = kn;
cbe54d63
MD
587
588 DO_OPS(ops, error, &ap, vop_kqfilter);
589 return(error);
2d3e977e
MD
590}
591
592int
0961aa92 593vop_revoke(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
594{
595 struct vop_revoke_args ap;
cbe54d63 596 int error;
2d3e977e
MD
597
598 ap.a_head.a_desc = &vop_revoke_desc;
0961aa92 599 ap.a_head.a_ops = ops;
2d3e977e
MD
600 ap.a_vp = vp;
601 ap.a_flags = flags;
cbe54d63
MD
602
603 DO_OPS(ops, error, &ap, vop_revoke);
604 return(error);
2d3e977e
MD
605}
606
607int
0961aa92
MD
608vop_mmap(struct vop_ops *ops, struct vnode *vp, int fflags, struct ucred *cred,
609 struct thread *td)
2d3e977e
MD
610{
611 struct vop_mmap_args ap;
cbe54d63 612 int error;
2d3e977e
MD
613
614 ap.a_head.a_desc = &vop_mmap_desc;
0961aa92 615 ap.a_head.a_ops = ops;
2d3e977e
MD
616 ap.a_vp = vp;
617 ap.a_fflags = fflags;
618 ap.a_cred = cred;
619 ap.a_td = td;
cbe54d63
MD
620
621 DO_OPS(ops, error, &ap, vop_mmap);
622 return(error);
2d3e977e
MD
623}
624
625int
0961aa92 626vop_fsync(struct vop_ops *ops, struct vnode *vp, int waitfor, struct thread *td)
2d3e977e
MD
627{
628 struct vop_fsync_args ap;
cbe54d63 629 int error;
2d3e977e
MD
630
631 ap.a_head.a_desc = &vop_fsync_desc;
0961aa92 632 ap.a_head.a_ops = ops;
2d3e977e
MD
633 ap.a_vp = vp;
634 ap.a_waitfor = waitfor;
635 ap.a_td = td;
cbe54d63
MD
636
637 DO_OPS(ops, error, &ap, vop_fsync);
638 return(error);
2d3e977e
MD
639}
640
641int
fad57d0e 642vop_remove(struct vop_ops *ops, struct vnode *dvp,
0961aa92 643 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
644{
645 struct vop_remove_args ap;
cbe54d63 646 int error;
2d3e977e
MD
647
648 ap.a_head.a_desc = &vop_remove_desc;
0961aa92 649 ap.a_head.a_ops = ops;
2d3e977e 650 ap.a_dvp = dvp;
2d3e977e
MD
651 ap.a_vp = vp;
652 ap.a_cnp = cnp;
cbe54d63
MD
653
654 DO_OPS(ops, error, &ap, vop_remove);
655 return(error);
2d3e977e
MD
656}
657
21739618 658int
fad57d0e 659vop_link(struct vop_ops *ops, struct vnode *tdvp,
0961aa92 660 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
661{
662 struct vop_link_args ap;
cbe54d63 663 int error;
2d3e977e
MD
664
665 ap.a_head.a_desc = &vop_link_desc;
0961aa92 666 ap.a_head.a_ops = ops;
2d3e977e 667 ap.a_tdvp = tdvp;
2d3e977e
MD
668 ap.a_vp = vp;
669 ap.a_cnp = cnp;
cbe54d63
MD
670
671 DO_OPS(ops, error, &ap, vop_link);
672 return(error);
2d3e977e
MD
673}
674
675int
fad57d0e
MD
676vop_rename(struct vop_ops *ops,
677 struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp,
678 struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp)
2d3e977e
MD
679{
680 struct vop_rename_args ap;
cbe54d63 681 int error;
2d3e977e
MD
682
683 ap.a_head.a_desc = &vop_rename_desc;
0961aa92 684 ap.a_head.a_ops = ops;
2d3e977e 685 ap.a_fdvp = fdvp;
2d3e977e
MD
686 ap.a_fvp = fvp;
687 ap.a_fcnp = fcnp;
688 ap.a_tdvp = tdvp;
2d3e977e
MD
689 ap.a_tvp = tvp;
690 ap.a_tcnp = tcnp;
cbe54d63
MD
691
692 DO_OPS(ops, error, &ap, vop_rename);
693 return(error);
2d3e977e
MD
694}
695
696int
fad57d0e 697vop_mkdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 698 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e
MD
699{
700 struct vop_mkdir_args ap;
cbe54d63 701 int error;
2d3e977e
MD
702
703 ap.a_head.a_desc = &vop_mkdir_desc;
0961aa92 704 ap.a_head.a_ops = ops;
2d3e977e 705 ap.a_dvp = dvp;
2d3e977e
MD
706 ap.a_vpp = vpp;
707 ap.a_cnp = cnp;
708 ap.a_vap = vap;
cbe54d63
MD
709
710 DO_OPS(ops, error, &ap, vop_mkdir);
711 return(error);
2d3e977e
MD
712}
713
714int
fad57d0e 715vop_rmdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 716 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
717{
718 struct vop_rmdir_args ap;
cbe54d63 719 int error;
2d3e977e
MD
720
721 ap.a_head.a_desc = &vop_rmdir_desc;
0961aa92 722 ap.a_head.a_ops = ops;
2d3e977e 723 ap.a_dvp = dvp;
2d3e977e
MD
724 ap.a_vp = vp;
725 ap.a_cnp = cnp;
cbe54d63
MD
726
727 DO_OPS(ops, error, &ap, vop_rmdir);
728 return(error);
2d3e977e
MD
729}
730
731int
fad57d0e 732vop_symlink(struct vop_ops *ops, struct vnode *dvp,
0961aa92
MD
733 struct vnode **vpp, struct componentname *cnp,
734 struct vattr *vap, char *target)
2d3e977e
MD
735{
736 struct vop_symlink_args ap;
cbe54d63 737 int error;
2d3e977e
MD
738
739 ap.a_head.a_desc = &vop_symlink_desc;
0961aa92 740 ap.a_head.a_ops = ops;
2d3e977e 741 ap.a_dvp = dvp;
2d3e977e
MD
742 ap.a_vpp = vpp;
743 ap.a_cnp = cnp;
744 ap.a_vap = vap;
745 ap.a_target = target;
cbe54d63
MD
746
747 DO_OPS(ops, error, &ap, vop_symlink);
748 return(error);
2d3e977e
MD
749}
750
751int
0961aa92
MD
752vop_readdir(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
753 struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies)
2d3e977e
MD
754{
755 struct vop_readdir_args ap;
cbe54d63 756 int error;
2d3e977e
MD
757
758 ap.a_head.a_desc = &vop_readdir_desc;
0961aa92 759 ap.a_head.a_ops = ops;
2d3e977e
MD
760 ap.a_vp = vp;
761 ap.a_uio = uio;
762 ap.a_cred = cred;
763 ap.a_eofflag = eofflag;
764 ap.a_ncookies = ncookies;
765 ap.a_cookies = cookies;
cbe54d63
MD
766
767 DO_OPS(ops, error, &ap, vop_readdir);
768 return(error);
2d3e977e
MD
769}
770
771int
0961aa92
MD
772vop_readlink(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
773 struct ucred *cred)
2d3e977e
MD
774{
775 struct vop_readlink_args ap;
cbe54d63 776 int error;
2d3e977e
MD
777
778 ap.a_head.a_desc = &vop_readlink_desc;
0961aa92 779 ap.a_head.a_ops = ops;
2d3e977e
MD
780 ap.a_vp = vp;
781 ap.a_uio = uio;
782 ap.a_cred = cred;
cbe54d63
MD
783
784 DO_OPS(ops, error, &ap, vop_readlink);
785 return(error);
2d3e977e
MD
786}
787
788int
0961aa92 789vop_inactive(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
790{
791 struct vop_inactive_args ap;
cbe54d63 792 int error;
2d3e977e
MD
793
794 ap.a_head.a_desc = &vop_inactive_desc;
0961aa92 795 ap.a_head.a_ops = ops;
2d3e977e
MD
796 ap.a_vp = vp;
797 ap.a_td = td;
cbe54d63
MD
798
799 DO_OPS(ops, error, &ap, vop_inactive);
800 return(error);
2d3e977e
MD
801}
802
803int
0961aa92 804vop_reclaim(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
805{
806 struct vop_reclaim_args ap;
cbe54d63 807 int error;
2d3e977e
MD
808
809 ap.a_head.a_desc = &vop_reclaim_desc;
0961aa92 810 ap.a_head.a_ops = ops;
2d3e977e
MD
811 ap.a_vp = vp;
812 ap.a_td = td;
cbe54d63
MD
813
814 DO_OPS(ops, error, &ap, vop_reclaim);
815 return(error);
2d3e977e
MD
816}
817
818int
5fd012e0 819vop_lock(struct vop_ops *ops, struct vnode *vp, int flags, struct thread *td)
2d3e977e
MD
820{
821 struct vop_lock_args ap;
cbe54d63 822 int error;
2d3e977e
MD
823
824 ap.a_head.a_desc = &vop_lock_desc;
0961aa92 825 ap.a_head.a_ops = ops;
2d3e977e 826 ap.a_vp = vp;
2d3e977e
MD
827 ap.a_flags = flags;
828 ap.a_td = td;
cbe54d63
MD
829
830 DO_OPS(ops, error, &ap, vop_lock);
831 return(error);
2d3e977e
MD
832}
833
834int
5fd012e0 835vop_unlock(struct vop_ops *ops, struct vnode *vp, int flags, struct thread *td)
2d3e977e
MD
836{
837 struct vop_unlock_args ap;
cbe54d63 838 int error;
2d3e977e
MD
839
840 ap.a_head.a_desc = &vop_unlock_desc;
0961aa92 841 ap.a_head.a_ops = ops;
2d3e977e 842 ap.a_vp = vp;
2d3e977e
MD
843 ap.a_flags = flags;
844 ap.a_td = td;
cbe54d63
MD
845
846 DO_OPS(ops, error, &ap, vop_unlock);
847 return(error);
2d3e977e
MD
848}
849
850int
0961aa92
MD
851vop_bmap(struct vop_ops *ops, struct vnode *vp, daddr_t bn, struct vnode **vpp,
852 daddr_t *bnp, int *runp, int *runb)
2d3e977e
MD
853{
854 struct vop_bmap_args ap;
cbe54d63 855 int error;
2d3e977e
MD
856
857 ap.a_head.a_desc = &vop_bmap_desc;
0961aa92 858 ap.a_head.a_ops = ops;
2d3e977e
MD
859 ap.a_vp = vp;
860 ap.a_bn = bn;
861 ap.a_vpp = vpp;
862 ap.a_bnp = bnp;
863 ap.a_runp = runp;
864 ap.a_runb = runb;
cbe54d63
MD
865
866 DO_OPS(ops, error, &ap, vop_bmap);
867 return(error);
2d3e977e
MD
868}
869
870int
0961aa92 871vop_strategy(struct vop_ops *ops, struct vnode *vp, struct buf *bp)
2d3e977e
MD
872{
873 struct vop_strategy_args ap;
cbe54d63 874 int error;
2d3e977e
MD
875
876 ap.a_head.a_desc = &vop_strategy_desc;
0961aa92 877 ap.a_head.a_ops = ops;
2d3e977e
MD
878 ap.a_vp = vp;
879 ap.a_bp = bp;
cbe54d63
MD
880
881 DO_OPS(ops, error, &ap, vop_strategy);
7d15906a
MD
882 if (error == 0 && (bp->b_flags & B_READ) == 0)
883 cache_update_fsmid_vp(vp);
cbe54d63 884 return(error);
2d3e977e
MD
885}
886
887int
0961aa92 888vop_print(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
889{
890 struct vop_print_args ap;
cbe54d63 891 int error;
2d3e977e
MD
892
893 ap.a_head.a_desc = &vop_print_desc;
0961aa92 894 ap.a_head.a_ops = ops;
2d3e977e 895 ap.a_vp = vp;
cbe54d63
MD
896
897 DO_OPS(ops, error, &ap, vop_print);
898 return(error);
2d3e977e
MD
899}
900
901int
0961aa92
MD
902vop_pathconf(struct vop_ops *ops, struct vnode *vp, int name,
903 register_t *retval)
2d3e977e
MD
904{
905 struct vop_pathconf_args ap;
cbe54d63 906 int error;
2d3e977e
MD
907
908 ap.a_head.a_desc = &vop_pathconf_desc;
0961aa92 909 ap.a_head.a_ops = ops;
2d3e977e
MD
910 ap.a_vp = vp;
911 ap.a_name = name;
912 ap.a_retval = retval;
cbe54d63
MD
913
914 DO_OPS(ops, error, &ap, vop_pathconf);
915 return(error);
2d3e977e
MD
916}
917
918int
0961aa92
MD
919vop_advlock(struct vop_ops *ops, struct vnode *vp, caddr_t id, int op,
920 struct flock *fl, int flags)
2d3e977e
MD
921{
922 struct vop_advlock_args ap;
cbe54d63 923 int error;
2d3e977e
MD
924
925 ap.a_head.a_desc = &vop_advlock_desc;
0961aa92 926 ap.a_head.a_ops = ops;
2d3e977e
MD
927 ap.a_vp = vp;
928 ap.a_id = id;
929 ap.a_op = op;
930 ap.a_fl = fl;
931 ap.a_flags = flags;
cbe54d63
MD
932
933 DO_OPS(ops, error, &ap, vop_advlock);
934 return(error);
2d3e977e
MD
935}
936
937int
0961aa92
MD
938vop_balloc(struct vop_ops *ops, struct vnode *vp, off_t startoffset,
939 int size, struct ucred *cred, int flags,
940 struct buf **bpp)
2d3e977e
MD
941{
942 struct vop_balloc_args ap;
cbe54d63 943 int error;
2d3e977e
MD
944
945 ap.a_head.a_desc = &vop_balloc_desc;
0961aa92 946 ap.a_head.a_ops = ops;
2d3e977e
MD
947 ap.a_vp = vp;
948 ap.a_startoffset = startoffset;
949 ap.a_size = size;
950 ap.a_cred = cred;
951 ap.a_flags = flags;
952 ap.a_bpp = bpp;
cbe54d63
MD
953
954 DO_OPS(ops, error, &ap, vop_balloc);
955 return(error);
2d3e977e
MD
956}
957
958int
0961aa92
MD
959vop_reallocblks(struct vop_ops *ops, struct vnode *vp,
960 struct cluster_save *buflist)
2d3e977e
MD
961{
962 struct vop_reallocblks_args ap;
cbe54d63 963 int error;
2d3e977e
MD
964
965 ap.a_head.a_desc = &vop_reallocblks_desc;
0961aa92 966 ap.a_head.a_ops = ops;
2d3e977e
MD
967 ap.a_vp = vp;
968 ap.a_buflist = buflist;
cbe54d63
MD
969
970 DO_OPS(ops, error, &ap, vop_reallocblks);
971 return(error);
2d3e977e
MD
972}
973
974int
0961aa92
MD
975vop_getpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
976 int reqpage, vm_ooffset_t offset)
2d3e977e
MD
977{
978 struct vop_getpages_args ap;
cbe54d63 979 int error;
2d3e977e
MD
980
981 ap.a_head.a_desc = &vop_getpages_desc;
0961aa92 982 ap.a_head.a_ops = ops;
2d3e977e
MD
983 ap.a_vp = vp;
984 ap.a_m = m;
985 ap.a_count = count;
986 ap.a_reqpage = reqpage;
987 ap.a_offset = offset;
cbe54d63
MD
988
989 DO_OPS(ops, error, &ap, vop_getpages);
990 return(error);
2d3e977e
MD
991}
992
993int
0961aa92
MD
994vop_putpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
995 int sync, int *rtvals, vm_ooffset_t offset)
2d3e977e
MD
996{
997 struct vop_putpages_args ap;
cbe54d63 998 int error;
2d3e977e
MD
999
1000 ap.a_head.a_desc = &vop_putpages_desc;
0961aa92 1001 ap.a_head.a_ops = ops;
2d3e977e
MD
1002 ap.a_vp = vp;
1003 ap.a_m = m;
1004 ap.a_count = count;
1005 ap.a_sync = sync;
1006 ap.a_rtvals = rtvals;
1007 ap.a_offset = offset;
cbe54d63
MD
1008
1009 DO_OPS(ops, error, &ap, vop_putpages);
7d15906a
MD
1010 if (error == 0)
1011 cache_update_fsmid_vp(vp);
cbe54d63 1012 return(error);
2d3e977e
MD
1013}
1014
1015int
0961aa92
MD
1016vop_freeblks(struct vop_ops *ops, struct vnode *vp,
1017 daddr_t addr, daddr_t length)
2d3e977e
MD
1018{
1019 struct vop_freeblks_args ap;
cbe54d63 1020 int error;
2d3e977e
MD
1021
1022 ap.a_head.a_desc = &vop_freeblks_desc;
0961aa92 1023 ap.a_head.a_ops = ops;
2d3e977e
MD
1024 ap.a_vp = vp;
1025 ap.a_addr = addr;
1026 ap.a_length = length;
cbe54d63
MD
1027
1028 DO_OPS(ops, error, &ap, vop_freeblks);
1029 return(error);
2d3e977e
MD
1030}
1031
1032int
0961aa92 1033vop_bwrite(struct vop_ops *ops, struct vnode *vp, struct buf *bp)
2d3e977e
MD
1034{
1035 struct vop_bwrite_args ap;
cbe54d63 1036 int error;
2d3e977e
MD
1037
1038 ap.a_head.a_desc = &vop_bwrite_desc;
0961aa92 1039 ap.a_head.a_ops = ops;
2d3e977e
MD
1040 ap.a_vp = vp;
1041 ap.a_bp = bp;
cbe54d63
MD
1042
1043 DO_OPS(ops, error, &ap, vop_bwrite);
7d15906a
MD
1044 if (error == 0)
1045 cache_update_fsmid_vp(vp);
cbe54d63 1046 return(error);
2d3e977e
MD
1047}
1048
1049int
0961aa92
MD
1050vop_getacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1051 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1052{
1053 struct vop_getacl_args ap;
cbe54d63 1054 int error;
2d3e977e
MD
1055
1056 ap.a_head.a_desc = &vop_getacl_desc;
0961aa92 1057 ap.a_head.a_ops = ops;
2d3e977e
MD
1058 ap.a_vp = vp;
1059 ap.a_type = type;
1060 ap.a_aclp = aclp;
1061 ap.a_cred = cred;
1062 ap.a_td = td;
cbe54d63
MD
1063
1064 DO_OPS(ops, error, &ap, vop_getacl);
1065 return(error);
2d3e977e
MD
1066}
1067
1068int
0961aa92
MD
1069vop_setacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1070 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1071{
1072 struct vop_setacl_args ap;
cbe54d63 1073 int error;
2d3e977e
MD
1074
1075 ap.a_head.a_desc = &vop_setacl_desc;
0961aa92 1076 ap.a_head.a_ops = ops;
2d3e977e
MD
1077 ap.a_vp = vp;
1078 ap.a_type = type;
1079 ap.a_aclp = aclp;
1080 ap.a_cred = cred;
1081 ap.a_td = td;
cbe54d63
MD
1082
1083 DO_OPS(ops, error, &ap, vop_setacl);
7d15906a
MD
1084 if (error == 0)
1085 cache_update_fsmid_vp(vp);
cbe54d63 1086 return(error);
2d3e977e
MD
1087}
1088
1089int
0961aa92
MD
1090vop_aclcheck(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1091 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1092{
1093 struct vop_aclcheck_args ap;
cbe54d63 1094 int error;
2d3e977e
MD
1095
1096 ap.a_head.a_desc = &vop_aclcheck_desc;
0961aa92 1097 ap.a_head.a_ops = ops;
2d3e977e
MD
1098 ap.a_vp = vp;
1099 ap.a_type = type;
1100 ap.a_aclp = aclp;
1101 ap.a_cred = cred;
1102 ap.a_td = td;
cbe54d63
MD
1103
1104 DO_OPS(ops, error, &ap, vop_aclcheck);
1105 return(error);
2d3e977e
MD
1106}
1107
1108int
0961aa92
MD
1109vop_getextattr(struct vop_ops *ops, struct vnode *vp, char *name,
1110 struct uio *uio, struct ucred *cred, struct thread *td)
2d3e977e
MD
1111{
1112 struct vop_getextattr_args ap;
cbe54d63 1113 int error;
2d3e977e
MD
1114
1115 ap.a_head.a_desc = &vop_getextattr_desc;
0961aa92 1116 ap.a_head.a_ops = ops;
2d3e977e
MD
1117 ap.a_vp = vp;
1118 ap.a_name = name;
1119 ap.a_uio = uio;
1120 ap.a_cred = cred;
1121 ap.a_td = td;
cbe54d63
MD
1122
1123 DO_OPS(ops, error, &ap, vop_getextattr);
1124 return(error);
2d3e977e
MD
1125}
1126
1127int
0961aa92
MD
1128vop_setextattr(struct vop_ops *ops, struct vnode *vp, char *name,
1129 struct uio *uio, struct ucred *cred, struct thread *td)
2d3e977e
MD
1130{
1131 struct vop_setextattr_args ap;
cbe54d63 1132 int error;
2d3e977e
MD
1133
1134 ap.a_head.a_desc = &vop_setextattr_desc;
0961aa92 1135 ap.a_head.a_ops = ops;
2d3e977e
MD
1136 ap.a_vp = vp;
1137 ap.a_name = name;
1138 ap.a_uio = uio;
1139 ap.a_cred = cred;
1140 ap.a_td = td;
cbe54d63
MD
1141
1142 DO_OPS(ops, error, &ap, vop_setextattr);
7d15906a
MD
1143 if (error == 0)
1144 cache_update_fsmid_vp(vp);
cbe54d63 1145 return(error);
2d3e977e
MD
1146}
1147
1148int
0961aa92 1149vop_createvobject(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
1150{
1151 struct vop_createvobject_args ap;
cbe54d63 1152 int error;
2d3e977e
MD
1153
1154 ap.a_head.a_desc = &vop_createvobject_desc;
0961aa92 1155 ap.a_head.a_ops = ops;
2d3e977e
MD
1156 ap.a_vp = vp;
1157 ap.a_td = td;
cbe54d63
MD
1158
1159 DO_OPS(ops, error, &ap, vop_createvobject);
1160 return(error);
2d3e977e
MD
1161}
1162
1163int
0961aa92 1164vop_destroyvobject(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
1165{
1166 struct vop_destroyvobject_args ap;
cbe54d63 1167 int error;
2d3e977e
MD
1168
1169 ap.a_head.a_desc = &vop_destroyvobject_desc;
0961aa92 1170 ap.a_head.a_ops = ops;
2d3e977e 1171 ap.a_vp = vp;
cbe54d63
MD
1172
1173 DO_OPS(ops, error, &ap, vop_destroyvobject);
1174 return(error);
2d3e977e
MD
1175}
1176
1177int
0961aa92 1178vop_getvobject(struct vop_ops *ops, struct vnode *vp, struct vm_object **objpp)
2d3e977e
MD
1179{
1180 struct vop_getvobject_args ap;
cbe54d63 1181 int error;
2d3e977e
MD
1182
1183 ap.a_head.a_desc = &vop_getvobject_desc;
0961aa92 1184 ap.a_head.a_ops = ops;
2d3e977e
MD
1185 ap.a_vp = vp;
1186 ap.a_objpp = objpp;
cbe54d63
MD
1187
1188 DO_OPS(ops, error, &ap, vop_getvobject);
1189 return(error);
1190}
1191
1192int
2281065e
MD
1193vop_mountctl(struct vop_ops *ops, int op, struct file *fp,
1194 const void *ctl, int ctllen, void *buf, int buflen, int *res)
cbe54d63 1195{
949ecb9b 1196 struct vop_mountctl_args ap;
cbe54d63
MD
1197 int error;
1198
949ecb9b 1199 ap.a_head.a_desc = &vop_mountctl_desc;
cbe54d63
MD
1200 ap.a_head.a_ops = ops;
1201 ap.a_op = op;
949ecb9b 1202 ap.a_ctl = ctl;
2281065e 1203 ap.a_fp = fp;
949ecb9b
MD
1204 ap.a_ctllen = ctllen;
1205 ap.a_buf = buf;
1206 ap.a_buflen = buflen;
1207 ap.a_res = res;
cbe54d63 1208
949ecb9b 1209 DO_OPS(ops, error, &ap, vop_mountctl);
cbe54d63 1210 return(error);
0961aa92
MD
1211}
1212
fad57d0e
MD
1213/*
1214 * NEW API FUNCTIONS
1215 *
1216 * nresolve takes a locked ncp and a cred and resolves the ncp into a
1217 * positive or negative hit.
1218 *
1219 * The namecache is automatically adjusted by this function. The ncp
1220 * is left locked on return.
1221 */
1222int
1223vop_nresolve(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1224{
1225 struct vop_nresolve_args ap;
1226 int error;
1227
1228 ap.a_head.a_desc = &vop_nresolve_desc;
1229 ap.a_head.a_ops = ops;
1230 ap.a_ncp = ncp;
1231 ap.a_cred = cred;
1232
1233 DO_OPS(ops, error, &ap, vop_nresolve);
1234 return(error);
1235}
1236
1237/*
1238 * nlookupdotdot takes an unlocked directory, dvp, and looks up "..", returning
1239 * a locked parent directory in *vpp. If an error occurs *vpp will be NULL.
1240 */
1241int
1242vop_nlookupdotdot(struct vop_ops *ops, struct vnode *dvp,
1243 struct vnode **vpp, struct ucred *cred)
1244{
1245 struct vop_nlookupdotdot_args ap;
1246 int error;
1247
1248 ap.a_head.a_desc = &vop_nlookupdotdot_desc;
1249 ap.a_head.a_ops = ops;
1250 ap.a_dvp = dvp;
1251 ap.a_vpp = vpp;
1252 ap.a_cred = cred;
1253
1254 DO_OPS(ops, error, &ap, vop_nlookupdotdot);
1255 return(error);
1256}
1257
1258/*
1259 * ncreate takes a locked, resolved ncp that typically represents a negative
1260 * cache hit and creates the file or node specified by the ncp, cred, and
1261 * vattr. If no error occurs a locked vnode is returned in *vpp.
1262 *
1263 * The namecache is automatically adjusted by this function. The ncp
1264 * is left locked on return.
1265 */
1266int
1267vop_ncreate(struct vop_ops *ops, struct namecache *ncp,
1268 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1269{
1270 struct vop_ncreate_args ap;
1271 int error;
1272
1273 ap.a_head.a_desc = &vop_ncreate_desc;
1274 ap.a_head.a_ops = ops;
1275 ap.a_ncp = ncp;
1276 ap.a_vpp = vpp;
1277 ap.a_cred = cred;
1278 ap.a_vap = vap;
1279
1280 DO_OPS(ops, error, &ap, vop_ncreate);
7d15906a
MD
1281 if (error == 0 && *vpp)
1282 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1283 return(error);
1284}
1285
1286/*
1287 * nmkdir takes a locked, resolved ncp that typically represents a negative
1288 * cache hit and creates the directory specified by the ncp, cred, and
1289 * vattr. If no error occurs a locked vnode is returned in *vpp.
1290 *
1291 * The namecache is automatically adjusted by this function. The ncp
1292 * is left locked on return.
1293 */
1294int
1295vop_nmkdir(struct vop_ops *ops, struct namecache *ncp,
1296 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1297{
1298 struct vop_nmkdir_args ap;
1299 int error;
1300
1301 ap.a_head.a_desc = &vop_nmkdir_desc;
1302 ap.a_head.a_ops = ops;
1303 ap.a_ncp = ncp;
1304 ap.a_vpp = vpp;
1305 ap.a_cred = cred;
1306 ap.a_vap = vap;
1307
1308 DO_OPS(ops, error, &ap, vop_nmkdir);
7d15906a
MD
1309 if (error == 0 && *vpp)
1310 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1311 return(error);
1312}
1313
1314/*
1315 * nmknod takes a locked, resolved ncp that typically represents a negative
1316 * cache hit and creates the node specified by the ncp, cred, and
1317 * vattr. If no error occurs a locked vnode is returned in *vpp.
1318 *
1319 * The namecache is automatically adjusted by this function. The ncp
1320 * is left locked on return.
1321 */
1322int
1323vop_nmknod(struct vop_ops *ops, struct namecache *ncp,
1324 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1325{
1326 struct vop_nmknod_args ap;
1327 int error;
1328
1329 ap.a_head.a_desc = &vop_nmknod_desc;
1330 ap.a_head.a_ops = ops;
1331 ap.a_ncp = ncp;
1332 ap.a_vpp = vpp;
1333 ap.a_cred = cred;
1334 ap.a_vap = vap;
1335
1336 DO_OPS(ops, error, &ap, vop_nmknod);
7d15906a
MD
1337 if (error == 0 && *vpp)
1338 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1339 return(error);
1340}
1341
1342/*
1343 * nlink takes a locked, resolved ncp that typically represents a negative
1344 * cache hit and creates the node specified by the ncp, cred, and
1345 * existing vnode. The passed vp must be locked and will remain locked
1346 * on return, as does the ncp, whether an error occurs or not.
1347 *
1348 * The namecache is automatically adjusted by this function. The ncp
1349 * is left locked on return.
1350 */
1351int
1352vop_nlink(struct vop_ops *ops, struct namecache *ncp,
1353 struct vnode *vp, struct ucred *cred)
1354{
1355 struct vop_nlink_args ap;
1356 int error;
1357
1358 ap.a_head.a_desc = &vop_nlink_desc;
1359 ap.a_head.a_ops = ops;
1360 ap.a_ncp = ncp;
1361 ap.a_vp = vp;
1362 ap.a_cred = cred;
1363
1364 DO_OPS(ops, error, &ap, vop_nlink);
7d15906a
MD
1365 if (error == 0)
1366 cache_update_fsmid(ncp);
fad57d0e
MD
1367 return(error);
1368}
1369
1370/*
1371 * nsymlink takes a locked, resolved ncp that typically represents a negative
1372 * cache hit and creates a symbolic link based on cred, vap, and target (the
1373 * contents of the link). If no error occurs a locked vnode is returned in
1374 * *vpp.
1375 *
1376 * The namecache is automatically adjusted by this function. The ncp
1377 * is left locked on return.
1378 */
1379int
1380vop_nsymlink(struct vop_ops *ops, struct namecache *ncp,
1381 struct vnode **vpp, struct ucred *cred,
1382 struct vattr *vap, char *target)
1383{
1384 struct vop_nsymlink_args ap;
1385 int error;
1386
1387 ap.a_head.a_desc = &vop_nsymlink_desc;
1388 ap.a_head.a_ops = ops;
1389 ap.a_ncp = ncp;
1390 ap.a_vpp = vpp;
1391 ap.a_cred = cred;
1392 ap.a_vap = vap;
1393 ap.a_target = target;
1394
1395 DO_OPS(ops, error, &ap, vop_nsymlink);
7d15906a
MD
1396 if (error == 0)
1397 cache_update_fsmid(ncp);
fad57d0e
MD
1398 return(error);
1399}
1400
1401/*
1402 * nwhiteout takes a locked, resolved ncp that can represent a positive or
1403 * negative hit and executes the whiteout function specified in flags.
1404 *
1405 * The namecache is automatically adjusted by this function. The ncp
1406 * is left locked on return.
1407 */
1408int
1409vop_nwhiteout(struct vop_ops *ops, struct namecache *ncp,
1410 struct ucred *cred, int flags)
1411{
1412 struct vop_nwhiteout_args ap;
1413 int error;
1414
1415 ap.a_head.a_desc = &vop_nwhiteout_desc;
1416 ap.a_head.a_ops = ops;
1417 ap.a_ncp = ncp;
1418 ap.a_cred = cred;
1419 ap.a_flags = flags;
1420
1421 DO_OPS(ops, error, &ap, vop_nwhiteout);
7d15906a
MD
1422 if (error == 0)
1423 cache_update_fsmid(ncp);
fad57d0e
MD
1424 return(error);
1425}
1426
1427/*
1428 * nremove takes a locked, resolved ncp that generally represents a
1429 * positive hit and removes the file.
1430 *
1431 * The namecache is automatically adjusted by this function. The ncp
1432 * is left locked on return.
1433 */
1434int
1435vop_nremove(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1436{
1437 struct vop_nremove_args ap;
1438 int error;
1439
1440 ap.a_head.a_desc = &vop_nremove_desc;
1441 ap.a_head.a_ops = ops;
1442 ap.a_ncp = ncp;
1443 ap.a_cred = cred;
1444
1445 DO_OPS(ops, error, &ap, vop_nremove);
7d15906a
MD
1446 if (error == 0)
1447 cache_update_fsmid(ncp);
fad57d0e
MD
1448 return(error);
1449}
1450
1451/*
1452 * nrmdir takes a locked, resolved ncp that generally represents a
1453 * directory and removes the directory.
1454 *
1455 * The namecache is automatically adjusted by this function. The ncp
1456 * is left locked on return.
1457 */
1458int
1459vop_nrmdir(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1460{
1461 struct vop_nrmdir_args ap;
1462 int error;
1463
1464 ap.a_head.a_desc = &vop_nrmdir_desc;
1465 ap.a_head.a_ops = ops;
1466 ap.a_ncp = ncp;
1467 ap.a_cred = cred;
1468
1469 DO_OPS(ops, error, &ap, vop_nrmdir);
7d15906a
MD
1470 if (error == 0)
1471 cache_update_fsmid(ncp);
fad57d0e
MD
1472 return(error);
1473}
1474
1475/*
1476 * nrename takes TWO locked, resolved ncp's and the cred of the caller
1477 * and renames the source ncp to the target ncp. The target ncp may
1478 * represent a positive or negative hit.
1479 *
1480 * The namecache is automatically adjusted by this function. The ncp
1481 * is left locked on return. The source ncp is typically changed to
1482 * a negative cache hit and the target ncp typically takes on the
1483 * source ncp's underlying file.
1484 */
1485int
1486vop_nrename(struct vop_ops *ops, struct namecache *fncp,
1487 struct namecache *tncp, struct ucred *cred)
1488{
1489 struct vop_nrename_args ap;
1490 int error;
1491
1492 ap.a_head.a_desc = &vop_nrename_desc;
1493 ap.a_head.a_ops = ops;
1494 ap.a_fncp = fncp;
1495 ap.a_tncp = tncp;
1496 ap.a_cred = cred;
1497
1498 DO_OPS(ops, error, &ap, vop_nrename);
7d15906a
MD
1499 if (error == 0) {
1500 cache_update_fsmid(fncp);
1501 cache_update_fsmid(tncp);
1502 }
fad57d0e
MD
1503 return(error);
1504}
1505
0961aa92
MD
1506/************************************************************************
1507 * PRIMARY VNODE OPERATIONS FORWARDING CALLS *
1508 ************************************************************************
1509 *
1510 * These procedures are called from VFSs such as unionfs and nullfs
1511 * when they wish to forward an operation on one VFS to another. The
1512 * argument structure/message is modified and then directly passed to the
1513 * appropriate routine. This routines may also be called by initiators
1514 * who have an argument structure in hand rather then discreet arguments.
1515 */
1516int
1517vop_vnoperate_ap(struct vop_generic_args *ap)
1518{
cbe54d63
MD
1519 struct vop_ops *ops;
1520 int error;
1521
1522 ops = ap->a_ops;
6ddb7618
MD
1523 error = VOCALL(ops, ap);
1524
1525 return (error);
1526}
1527
1528/*
1529 * This routine is called by the cache coherency layer to execute the actual
1530 * VFS operation. If a journaling layer is present we call though it, else
1531 * we call the native VOP functions.
1532 */
1533int
1534vop_cache_operate_ap(struct vop_generic_args *ap)
1535{
1536 struct vop_ops *ops;
1537 int error;
1538
1539 ops = ap->a_ops;
1540 if (ops->vv_mount->mnt_vn_journal_ops)
1541 error = VOCALL(ops->vv_mount->mnt_vn_journal_ops, ap);
1542 else
1543 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1544 return (error);
1545}
1546
1547
1548/*
1549 * This routine is called by the journaling layer to execute the actual
1550 * VFS operation.
1551 */
1552int
1553vop_journal_operate_ap(struct vop_generic_args *ap)
1554{
1555 struct vop_ops *ops;
1556 int error;
1557
1558 ops = ap->a_ops;
1559 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1560
cbe54d63 1561 return (error);
0961aa92
MD
1562}
1563
1564int
1565vop_islocked_ap(struct vop_islocked_args *ap)
1566{
cbe54d63
MD
1567 int error;
1568
1569 DO_OPS(ap->a_head.a_ops, error, ap, vop_islocked);
1570 return(error);
0961aa92
MD
1571}
1572
1573int
1574vop_lookup_ap(struct vop_lookup_args *ap)
1575{
cbe54d63
MD
1576 int error;
1577
1578 DO_OPS(ap->a_head.a_ops, error, ap, vop_lookup);
1579 return(error);
0961aa92
MD
1580}
1581
0961aa92
MD
1582int
1583vop_create_ap(struct vop_create_args *ap)
1584{
cbe54d63
MD
1585 int error;
1586
1587 DO_OPS(ap->a_head.a_ops, error, ap, vop_create);
1588 return(error);
0961aa92
MD
1589}
1590
1591int
1592vop_whiteout_ap(struct vop_whiteout_args *ap)
1593{
cbe54d63
MD
1594 int error;
1595
1596 DO_OPS(ap->a_head.a_ops, error, ap, vop_whiteout);
1597 return(error);
0961aa92
MD
1598}
1599
1600int
1601vop_mknod_ap(struct vop_mknod_args *ap)
1602{
cbe54d63
MD
1603 int error;
1604
1605 DO_OPS(ap->a_head.a_ops, error, ap, vop_mknod);
1606 return(error);
0961aa92
MD
1607}
1608
1609int
1610vop_open_ap(struct vop_open_args *ap)
1611{
cbe54d63
MD
1612 int error;
1613
1614 DO_OPS(ap->a_head.a_ops, error, ap, vop_open);
1615 return(error);
0961aa92
MD
1616}
1617
1618int
1619vop_close_ap(struct vop_close_args *ap)
1620{
cbe54d63
MD
1621 int error;
1622
1623 DO_OPS(ap->a_head.a_ops, error, ap, vop_close);
1624 return(error);
0961aa92
MD
1625}
1626
1627int
1628vop_access_ap(struct vop_access_args *ap)
1629{
cbe54d63
MD
1630 int error;
1631
1632 DO_OPS(ap->a_head.a_ops, error, ap, vop_access);
1633 return(error);
0961aa92
MD
1634}
1635
1636int
1637vop_getattr_ap(struct vop_getattr_args *ap)
1638{
cbe54d63
MD
1639 int error;
1640
1641 DO_OPS(ap->a_head.a_ops, error, ap, vop_getattr);
1642 return(error);
0961aa92
MD
1643}
1644
1645int
1646vop_setattr_ap(struct vop_setattr_args *ap)
1647{
cbe54d63
MD
1648 int error;
1649
1650 DO_OPS(ap->a_head.a_ops, error, ap, vop_setattr);
1651 return(error);
0961aa92
MD
1652}
1653
1654int
1655vop_read_ap(struct vop_read_args *ap)
1656{
cbe54d63
MD
1657 int error;
1658
1659 DO_OPS(ap->a_head.a_ops, error, ap, vop_read);
1660 return(error);
0961aa92
MD
1661}
1662
1663int
1664vop_write_ap(struct vop_write_args *ap)
1665{
cbe54d63
MD
1666 int error;
1667
1668 DO_OPS(ap->a_head.a_ops, error, ap, vop_write);
1669 return(error);
0961aa92
MD
1670}
1671
1672int
1673vop_lease_ap(struct vop_lease_args *ap)
1674{
cbe54d63
MD
1675 int error;
1676
1677 DO_OPS(ap->a_head.a_ops, error, ap, vop_lease);
1678 return(error);
0961aa92
MD
1679}
1680
1681int
1682vop_ioctl_ap(struct vop_ioctl_args *ap)
1683{
cbe54d63
MD
1684 int error;
1685
1686 DO_OPS(ap->a_head.a_ops, error, ap, vop_ioctl);
1687 return(error);
0961aa92
MD
1688}
1689
1690int
1691vop_poll_ap(struct vop_poll_args *ap)
1692{
cbe54d63
MD
1693 int error;
1694
1695 DO_OPS(ap->a_head.a_ops, error, ap, vop_poll);
1696 return(error);
0961aa92
MD
1697}
1698
1699int
1700vop_kqfilter_ap(struct vop_kqfilter_args *ap)
1701{
cbe54d63
MD
1702 int error;
1703
1704 DO_OPS(ap->a_head.a_ops, error, ap, vop_kqfilter);
1705 return(error);
0961aa92
MD
1706}
1707
1708int
1709vop_revoke_ap(struct vop_revoke_args *ap)
1710{
cbe54d63
MD
1711 int error;
1712
1713 DO_OPS(ap->a_head.a_ops, error, ap, vop_revoke);
1714 return(error);
0961aa92
MD
1715}
1716
1717int
1718vop_mmap_ap(struct vop_mmap_args *ap)
1719{
cbe54d63
MD
1720 int error;
1721
1722 DO_OPS(ap->a_head.a_ops, error, ap, vop_mmap);
1723 return(error);
0961aa92
MD
1724}
1725
1726int
1727vop_fsync_ap(struct vop_fsync_args *ap)
1728{
cbe54d63
MD
1729 int error;
1730
1731 DO_OPS(ap->a_head.a_ops, error, ap, vop_fsync);
1732 return(error);
0961aa92
MD
1733}
1734
1735int
1736vop_remove_ap(struct vop_remove_args *ap)
1737{
cbe54d63
MD
1738 int error;
1739
1740 DO_OPS(ap->a_head.a_ops, error, ap, vop_remove);
1741 return(error);
0961aa92
MD
1742}
1743
1744int
1745vop_link_ap(struct vop_link_args *ap)
1746{
cbe54d63
MD
1747 int error;
1748
1749 DO_OPS(ap->a_head.a_ops, error, ap, vop_link);
1750 return(error);
0961aa92
MD
1751}
1752
1753int
1754vop_rename_ap(struct vop_rename_args *ap)
1755{
cbe54d63
MD
1756 int error;
1757
1758 DO_OPS(ap->a_head.a_ops, error, ap, vop_rename);
1759 return(error);
0961aa92
MD
1760}
1761
1762int
1763vop_mkdir_ap(struct vop_mkdir_args *ap)
1764{
cbe54d63
MD
1765 int error;
1766
1767 DO_OPS(ap->a_head.a_ops, error, ap, vop_mkdir);
1768 return(error);
0961aa92
MD
1769}
1770
1771int
1772vop_rmdir_ap(struct vop_rmdir_args *ap)
1773{
cbe54d63
MD
1774 int error;
1775
1776 DO_OPS(ap->a_head.a_ops, error, ap, vop_rmdir);
1777 return(error);
0961aa92
MD
1778}
1779
1780int
1781vop_symlink_ap(struct vop_symlink_args *ap)
1782{
cbe54d63
MD
1783 int error;
1784
1785 DO_OPS(ap->a_head.a_ops, error, ap, vop_symlink);
1786 return(error);
0961aa92
MD
1787}
1788
1789int
1790vop_readdir_ap(struct vop_readdir_args *ap)
1791{
cbe54d63
MD
1792 int error;
1793
1794 DO_OPS(ap->a_head.a_ops, error, ap, vop_readdir);
1795 return(error);
0961aa92
MD
1796}
1797
1798int
1799vop_readlink_ap(struct vop_readlink_args *ap)
1800{
cbe54d63
MD
1801 int error;
1802
1803 DO_OPS(ap->a_head.a_ops, error, ap, vop_readlink);
1804 return(error);
0961aa92
MD
1805}
1806
1807int
1808vop_inactive_ap(struct vop_inactive_args *ap)
1809{
cbe54d63
MD
1810 int error;
1811
1812 DO_OPS(ap->a_head.a_ops, error, ap, vop_inactive);
1813 return(error);
0961aa92
MD
1814}
1815
1816int
1817vop_reclaim_ap(struct vop_reclaim_args *ap)
1818{
cbe54d63
MD
1819 int error;
1820
1821 DO_OPS(ap->a_head.a_ops, error, ap, vop_reclaim);
1822 return(error);
0961aa92
MD
1823}
1824
1825int
1826vop_lock_ap(struct vop_lock_args *ap)
1827{
cbe54d63
MD
1828 int error;
1829
1830 DO_OPS(ap->a_head.a_ops, error, ap, vop_lock);
1831 return(error);
0961aa92
MD
1832}
1833
1834int
1835vop_unlock_ap(struct vop_unlock_args *ap)
1836{
cbe54d63
MD
1837 int error;
1838
1839 DO_OPS(ap->a_head.a_ops, error, ap, vop_unlock);
1840 return(error);
0961aa92
MD
1841}
1842
1843int
1844vop_bmap_ap(struct vop_bmap_args *ap)
1845{
cbe54d63
MD
1846 int error;
1847
1848 DO_OPS(ap->a_head.a_ops, error, ap, vop_bmap);
1849 return(error);
0961aa92
MD
1850}
1851
1852int
1853vop_strategy_ap(struct vop_strategy_args *ap)
1854{
cbe54d63
MD
1855 int error;
1856
1857 DO_OPS(ap->a_head.a_ops, error, ap, vop_strategy);
1858 return(error);
0961aa92
MD
1859}
1860
1861int
1862vop_print_ap(struct vop_print_args *ap)
1863{
cbe54d63
MD
1864 int error;
1865
1866 DO_OPS(ap->a_head.a_ops, error, ap, vop_print);
1867 return(error);
0961aa92
MD
1868}
1869
1870int
1871vop_pathconf_ap(struct vop_pathconf_args *ap)
1872{
cbe54d63
MD
1873 int error;
1874
1875 DO_OPS(ap->a_head.a_ops, error, ap, vop_pathconf);
1876 return(error);
0961aa92
MD
1877}
1878
1879int
1880vop_advlock_ap(struct vop_advlock_args *ap)
1881{
cbe54d63
MD
1882 int error;
1883
1884 DO_OPS(ap->a_head.a_ops, error, ap, vop_advlock);
1885 return(error);
0961aa92
MD
1886}
1887
1888int
1889vop_balloc_ap(struct vop_balloc_args *ap)
1890{
cbe54d63
MD
1891 int error;
1892
1893 DO_OPS(ap->a_head.a_ops, error, ap, vop_balloc);
1894 return(error);
0961aa92
MD
1895}
1896
1897int
1898vop_reallocblks_ap(struct vop_reallocblks_args *ap)
1899{
cbe54d63
MD
1900 int error;
1901
1902 DO_OPS(ap->a_head.a_ops, error, ap, vop_reallocblks);
1903 return(error);
0961aa92
MD
1904}
1905
1906int
1907vop_getpages_ap(struct vop_getpages_args *ap)
1908{
cbe54d63
MD
1909 int error;
1910
1911 DO_OPS(ap->a_head.a_ops, error, ap, vop_getpages);
1912 return(error);
0961aa92
MD
1913}
1914
1915int
1916vop_putpages_ap(struct vop_putpages_args *ap)
1917{
cbe54d63
MD
1918 int error;
1919
1920 DO_OPS(ap->a_head.a_ops, error, ap, vop_putpages);
1921 return(error);
0961aa92
MD
1922}
1923
1924int
1925vop_freeblks_ap(struct vop_freeblks_args *ap)
1926{
cbe54d63
MD
1927 int error;
1928
1929 DO_OPS(ap->a_head.a_ops, error, ap, vop_freeblks);
1930 return(error);
0961aa92
MD
1931}
1932
1933int
1934vop_bwrite_ap(struct vop_bwrite_args *ap)
1935{
cbe54d63
MD
1936 int error;
1937
1938 DO_OPS(ap->a_head.a_ops, error, ap, vop_bwrite);
1939 return(error);
0961aa92
MD
1940}
1941
1942int
1943vop_getacl_ap(struct vop_getacl_args *ap)
1944{
cbe54d63
MD
1945 int error;
1946
1947 DO_OPS(ap->a_head.a_ops, error, ap, vop_getacl);
1948 return(error);
0961aa92
MD
1949}
1950
1951int
1952vop_setacl_ap(struct vop_setacl_args *ap)
1953{
cbe54d63
MD
1954 int error;
1955
1956 DO_OPS(ap->a_head.a_ops, error, ap, vop_setacl);
1957 return(error);
0961aa92
MD
1958}
1959
1960int
1961vop_aclcheck_ap(struct vop_aclcheck_args *ap)
1962{
cbe54d63
MD
1963 int error;
1964
1965 DO_OPS(ap->a_head.a_ops, error, ap, vop_aclcheck);
1966 return(error);
0961aa92
MD
1967}
1968
1969int
1970vop_getextattr_ap(struct vop_getextattr_args *ap)
1971{
cbe54d63
MD
1972 int error;
1973
1974 DO_OPS(ap->a_head.a_ops, error, ap, vop_getextattr);
1975 return(error);
0961aa92
MD
1976}
1977
1978int
1979vop_setextattr_ap(struct vop_setextattr_args *ap)
1980{
cbe54d63
MD
1981 int error;
1982
1983 DO_OPS(ap->a_head.a_ops, error, ap, vop_setextattr);
1984 return(error);
0961aa92
MD
1985}
1986
1987int
1988vop_createvobject_ap(struct vop_createvobject_args *ap)
1989{
cbe54d63
MD
1990 int error;
1991
1992 DO_OPS(ap->a_head.a_ops, error, ap, vop_createvobject);
1993 return(error);
0961aa92
MD
1994}
1995
1996int
1997vop_destroyvobject_ap(struct vop_destroyvobject_args *ap)
1998{
cbe54d63
MD
1999 int error;
2000
2001 DO_OPS(ap->a_head.a_ops, error, ap, vop_destroyvobject);
2002 return(error);
0961aa92
MD
2003}
2004
2005int
2006vop_getvobject_ap(struct vop_getvobject_args *ap)
2007{
cbe54d63
MD
2008 int error;
2009
2010 DO_OPS(ap->a_head.a_ops, error, ap, vop_getvobject);
2011 return(error);
2012}
2013
2014int
949ecb9b 2015vop_mountctl_ap(struct vop_mountctl_args *ap)
cbe54d63
MD
2016{
2017 int error;
2018
949ecb9b 2019 DO_OPS(ap->a_head.a_ops, error, ap, vop_mountctl);
cbe54d63 2020 return(error);
2d3e977e
MD
2021}
2022
fad57d0e
MD
2023int
2024vop_nresolve_ap(struct vop_nresolve_args *ap)
2025{
2026 int error;
2027
2028 DO_OPS(ap->a_head.a_ops, error, ap, vop_nresolve);
2029 return(error);
2030}
2031
2032int
2033vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args *ap)
2034{
2035 int error;
2036
2037 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlookupdotdot);
2038 return(error);
2039}
2040
2041int
2042vop_ncreate_ap(struct vop_ncreate_args *ap)
2043{
2044 int error;
2045
2046 DO_OPS(ap->a_head.a_ops, error, ap, vop_ncreate);
2047 return(error);
2048}
2049
2050int
2051vop_nmkdir_ap(struct vop_nmkdir_args *ap)
2052{
2053 int error;
2054
2055 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmkdir);
2056 return(error);
2057}
2058
2059int
2060vop_nmknod_ap(struct vop_nmknod_args *ap)
2061{
2062 int error;
2063
2064 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmknod);
2065 return(error);
2066}
2067
2068int
2069vop_nlink_ap(struct vop_nlink_args *ap)
2070{
2071 int error;
2072
2073 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlink);
2074 return(error);
2075}
2076
2077int
2078vop_nsymlink_ap(struct vop_nsymlink_args *ap)
2079{
2080 int error;
2081
2082 DO_OPS(ap->a_head.a_ops, error, ap, vop_nsymlink);
2083 return(error);
2084}
2085
2086int
2087vop_nwhiteout_ap(struct vop_nwhiteout_args *ap)
2088{
2089 int error;
2090
2091 DO_OPS(ap->a_head.a_ops, error, ap, vop_nwhiteout);
2092 return(error);
2093}
2094
2095int
2096vop_nremove_ap(struct vop_nremove_args *ap)
2097{
2098 int error;
2099
2100 DO_OPS(ap->a_head.a_ops, error, ap, vop_nremove);
2101 return(error);
2102}
2103
2104int
2105vop_nrmdir_ap(struct vop_nrmdir_args *ap)
2106{
2107 int error;
2108
2109 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrmdir);
2110 return(error);
2111}
2112
2113int
2114vop_nrename_ap(struct vop_nrename_args *ap)
2115{
2116 int error;
2117
2118 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrename);
2119 return(error);
2120}
2121