UMAPFS has been disabled (and non-working) for a long time. Scrap it
[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 *
87de5057 35 * $DragonFly: src/sys/kern/vfs_vopops.c,v 1.25 2006/05/06 02:43:12 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);
e62afb5f
MD
216VNODEOP_DESC_INIT_DVP_VPP_CNP(old_lookup);
217VNODEOP_DESC_INIT_DVP_VPP_CNP(old_create);
218VNODEOP_DESC_INIT_DVP_CNP(old_whiteout);
219VNODEOP_DESC_INIT_DVP_VPP_CNP(old_mknod);
2d3e977e
MD
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);
2d3e977e
MD
227VNODEOP_DESC_INIT_VP_CRED(ioctl);
228VNODEOP_DESC_INIT_VP_CRED(poll);
229VNODEOP_DESC_INIT_VP(kqfilter);
230VNODEOP_DESC_INIT_VP(revoke);
231VNODEOP_DESC_INIT_VP_CRED(mmap);
232VNODEOP_DESC_INIT_VP(fsync);
e62afb5f
MD
233VNODEOP_DESC_INIT_DVP_VP_CNP(old_remove);
234VNODEOP_DESC_INIT_TDVP_VP_CNP(old_link);
235
236static int VOFFNAME(old_rename)[] = {
237 __offsetof(VARGSSTRUCT(old_rename), a_fdvp),
238 __offsetof(VARGSSTRUCT(old_rename), a_fvp),
239 __offsetof(VARGSSTRUCT(old_rename), a_tdvp),
240 __offsetof(VARGSSTRUCT(old_rename), a_tvp),
2d3e977e
MD
241 VDESC_NO_OFFSET
242};
e62afb5f 243VNODEOP_DESC_INIT(old_rename,
2d3e977e 244 VDESC_VP0_WILLRELE|VDESC_VP1_WILLRELE|
3446c007
MD
245 VDESC_VP2_WILLRELE|VDESC_VP3_WILLRELE|
246 VDESC_VP2_WILLUNLOCK|VDESC_VP3_WILLUNLOCK, /* tdvp and tvp */
e62afb5f 247 VOFFNAME(old_rename),
2d3e977e
MD
248 VDESC_NO_OFFSET,
249 VDESC_NO_OFFSET,
250 VDESC_NO_OFFSET,
e62afb5f 251 __offsetof(VARGSSTRUCT(old_rename), a_fcnp));
fad57d0e 252
e62afb5f
MD
253VNODEOP_DESC_INIT_DVP_VPP_CNP(old_mkdir);
254VNODEOP_DESC_INIT_DVP_VP_CNP(old_rmdir);
255VNODEOP_DESC_INIT_DVP_VPP_CNP(old_symlink);
2d3e977e
MD
256VNODEOP_DESC_INIT_VP_CRED(readdir);
257VNODEOP_DESC_INIT_VP_CRED(readlink);
258VNODEOP_DESC_INIT_VP(inactive);
259VNODEOP_DESC_INIT_VP(reclaim);
260VNODEOP_DESC_INIT_VP(lock);
261VNODEOP_DESC_INIT_VP(unlock);
262VNODEOP_DESC_INIT_VP_VPP(bmap);
263VNODEOP_DESC_INIT_VP(strategy);
264VNODEOP_DESC_INIT_VP(print);
265VNODEOP_DESC_INIT_VP(pathconf);
266VNODEOP_DESC_INIT_VP(advlock);
267VNODEOP_DESC_INIT_VP_CRED(balloc);
268VNODEOP_DESC_INIT_VP(reallocblks);
269VNODEOP_DESC_INIT_VP(getpages);
270VNODEOP_DESC_INIT_VP(putpages);
271VNODEOP_DESC_INIT_VP(freeblks);
2d3e977e
MD
272VNODEOP_DESC_INIT_VP_CRED(getacl);
273VNODEOP_DESC_INIT_VP_CRED(setacl);
274VNODEOP_DESC_INIT_VP_CRED(aclcheck);
275VNODEOP_DESC_INIT_VP_CRED(getextattr);
276VNODEOP_DESC_INIT_VP_CRED(setextattr);
949ecb9b 277VNODEOP_DESC_INIT_SIMPLE(mountctl);
cbe54d63 278
fad57d0e
MD
279VNODEOP_DESC_INIT_NCP_CRED(nresolve);
280VNODEOP_DESC_INIT_DVP_VPP_CRED(nlookupdotdot);
281VNODEOP_DESC_INIT_NCP_CRED_VPP(ncreate);
282VNODEOP_DESC_INIT_NCP_CRED_VPP(nmkdir);
283VNODEOP_DESC_INIT_NCP_CRED_VPP(nmknod);
284VNODEOP_DESC_INIT_NCP_VP_CRED(nlink);
285VNODEOP_DESC_INIT_NCP_CRED_VPP(nsymlink);
286VNODEOP_DESC_INIT_NCP_CRED(nwhiteout);
287VNODEOP_DESC_INIT_NCP_CRED(nremove);
288VNODEOP_DESC_INIT_NCP_CRED(nrmdir);
289VNODEOP_DESC_INIT_NCP2_CRED(nrename);
290
6ddb7618
MD
291#define DO_OPS(ops, error, ap, vop_field) \
292 error = ops->vop_field(ap);
2d3e977e 293
0961aa92
MD
294/************************************************************************
295 * PRIMARY HIGH LEVEL VNODE OPERATIONS CALLS *
296 ************************************************************************
297 *
298 * These procedures are called directly from the kernel and/or fileops
299 * code to perform file/device operations on the system.
e62afb5f
MD
300 *
301 * NOTE: The old namespace api functions such as vop_rename() are no longer
302 * available for general use and have been renamed to vop_old_*(). Only
303 * the code in vfs_default.c is allowed to call those ops.
0961aa92
MD
304 */
305
2d3e977e 306int
0961aa92 307vop_islocked(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
308{
309 struct vop_islocked_args ap;
cbe54d63 310 int error;
2d3e977e
MD
311
312 ap.a_head.a_desc = &vop_islocked_desc;
0961aa92 313 ap.a_head.a_ops = ops;
2d3e977e
MD
314 ap.a_vp = vp;
315 ap.a_td = td;
cbe54d63
MD
316
317 DO_OPS(ops, error, &ap, vop_islocked);
318 return(error);
2d3e977e
MD
319}
320
321int
e62afb5f 322vop_old_lookup(struct vop_ops *ops, struct vnode *dvp,
26b67a34 323 struct vnode **vpp, struct componentname *cnp)
2d3e977e 324{
e62afb5f 325 struct vop_old_lookup_args ap;
cbe54d63 326 int error;
2d3e977e 327
e62afb5f 328 ap.a_head.a_desc = &vop_old_lookup_desc;
0961aa92 329 ap.a_head.a_ops = ops;
2d3e977e 330 ap.a_dvp = dvp;
2d3e977e 331 ap.a_vpp = vpp;
2d3e977e 332 ap.a_cnp = cnp;
cbe54d63 333
e62afb5f 334 DO_OPS(ops, error, &ap, vop_old_lookup);
cbe54d63 335 return(error);
2d3e977e
MD
336}
337
338int
e62afb5f 339vop_old_create(struct vop_ops *ops, struct vnode *dvp,
0961aa92 340 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e 341{
e62afb5f 342 struct vop_old_create_args ap;
cbe54d63 343 int error;
2d3e977e 344
e62afb5f 345 ap.a_head.a_desc = &vop_old_create_desc;
0961aa92 346 ap.a_head.a_ops = ops;
2d3e977e 347 ap.a_dvp = dvp;
2d3e977e
MD
348 ap.a_vpp = vpp;
349 ap.a_cnp = cnp;
350 ap.a_vap = vap;
cbe54d63 351
e62afb5f 352 DO_OPS(ops, error, &ap, vop_old_create);
cbe54d63 353 return(error);
2d3e977e
MD
354}
355
356int
e62afb5f 357vop_old_whiteout(struct vop_ops *ops, struct vnode *dvp,
0961aa92 358 struct componentname *cnp, int flags)
2d3e977e 359{
e62afb5f 360 struct vop_old_whiteout_args ap;
cbe54d63 361 int error;
2d3e977e 362
e62afb5f 363 ap.a_head.a_desc = &vop_old_whiteout_desc;
0961aa92 364 ap.a_head.a_ops = ops;
2d3e977e 365 ap.a_dvp = dvp;
2d3e977e
MD
366 ap.a_cnp = cnp;
367 ap.a_flags = flags;
cbe54d63 368
e62afb5f 369 DO_OPS(ops, error, &ap, vop_old_whiteout);
cbe54d63 370 return(error);
2d3e977e
MD
371}
372
373int
e62afb5f 374vop_old_mknod(struct vop_ops *ops, struct vnode *dvp,
0961aa92 375 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e 376{
e62afb5f 377 struct vop_old_mknod_args ap;
cbe54d63 378 int error;
2d3e977e 379
e62afb5f 380 ap.a_head.a_desc = &vop_old_mknod_desc;
0961aa92 381 ap.a_head.a_ops = ops;
2d3e977e 382 ap.a_dvp = dvp;
2d3e977e
MD
383 ap.a_vpp = vpp;
384 ap.a_cnp = cnp;
385 ap.a_vap = vap;
cbe54d63 386
e62afb5f 387 DO_OPS(ops, error, &ap, vop_old_mknod);
cbe54d63 388 return(error);
2d3e977e
MD
389}
390
391int
0961aa92 392vop_open(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
87de5057 393 struct file *fp)
2d3e977e
MD
394{
395 struct vop_open_args ap;
cbe54d63 396 int error;
2d3e977e
MD
397
398 ap.a_head.a_desc = &vop_open_desc;
0961aa92 399 ap.a_head.a_ops = ops;
2d3e977e 400 ap.a_vp = vp;
fad57d0e 401 ap.a_fp = fp;
2d3e977e
MD
402 ap.a_mode = mode;
403 ap.a_cred = cred;
cbe54d63
MD
404
405 DO_OPS(ops, error, &ap, vop_open);
406 return(error);
2d3e977e
MD
407}
408
409int
87de5057 410vop_close(struct vop_ops *ops, struct vnode *vp, int fflag)
2d3e977e
MD
411{
412 struct vop_close_args ap;
cbe54d63 413 int error;
2d3e977e
MD
414
415 ap.a_head.a_desc = &vop_close_desc;
0961aa92 416 ap.a_head.a_ops = ops;
2d3e977e
MD
417 ap.a_vp = vp;
418 ap.a_fflag = fflag;
cbe54d63
MD
419
420 DO_OPS(ops, error, &ap, vop_close);
421 return(error);
2d3e977e
MD
422}
423
424int
87de5057 425vop_access(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred)
2d3e977e
MD
426{
427 struct vop_access_args ap;
cbe54d63 428 int error;
2d3e977e
MD
429
430 ap.a_head.a_desc = &vop_access_desc;
0961aa92 431 ap.a_head.a_ops = ops;
2d3e977e
MD
432 ap.a_vp = vp;
433 ap.a_mode = mode;
434 ap.a_cred = cred;
cbe54d63
MD
435
436 DO_OPS(ops, error, &ap, vop_access);
437 return(error);
2d3e977e
MD
438}
439
440int
87de5057 441vop_getattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap)
2d3e977e
MD
442{
443 struct vop_getattr_args ap;
dc1be39c 444 struct namecache *ncp;
cbe54d63 445 int error;
2d3e977e
MD
446
447 ap.a_head.a_desc = &vop_getattr_desc;
0961aa92 448 ap.a_head.a_ops = ops;
2d3e977e
MD
449 ap.a_vp = vp;
450 ap.a_vap = vap;
cbe54d63
MD
451
452 DO_OPS(ops, error, &ap, vop_getattr);
dc1be39c
MD
453 if ((ops->vv_flags & VVF_SUPPORTS_FSMID) == 0) {
454 if ((ncp = TAILQ_FIRST(&vp->v_namecache)) != NULL) {
455 if (ncp->nc_flag & NCF_FSMID) {
456 ncp->nc_flag &= ~NCF_FSMID;
457 ++ncp->nc_fsmid;
458 }
459 vap->va_fsmid = ncp->nc_fsmid;
460 }
461 }
cbe54d63 462 return(error);
2d3e977e
MD
463}
464
465int
0961aa92 466vop_setattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap,
87de5057 467 struct ucred *cred)
2d3e977e
MD
468{
469 struct vop_setattr_args ap;
cbe54d63 470 int error;
2d3e977e
MD
471
472 ap.a_head.a_desc = &vop_setattr_desc;
0961aa92 473 ap.a_head.a_ops = ops;
2d3e977e
MD
474 ap.a_vp = vp;
475 ap.a_vap = vap;
476 ap.a_cred = cred;
cbe54d63
MD
477
478 DO_OPS(ops, error, &ap, vop_setattr);
7d15906a
MD
479 if (error == 0)
480 cache_update_fsmid_vp(vp);
cbe54d63 481 return(error);
2d3e977e
MD
482}
483
484int
0961aa92
MD
485vop_read(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
486 struct ucred *cred)
2d3e977e
MD
487{
488 struct vop_read_args ap;
cbe54d63 489 int error;
2d3e977e
MD
490
491 ap.a_head.a_desc = &vop_read_desc;
0961aa92 492 ap.a_head.a_ops = ops;
2d3e977e
MD
493 ap.a_vp = vp;
494 ap.a_uio = uio;
495 ap.a_ioflag = ioflag;
496 ap.a_cred = cred;
cbe54d63
MD
497
498 DO_OPS(ops, error, &ap, vop_read);
499 return(error);
2d3e977e
MD
500}
501
502int
0961aa92
MD
503vop_write(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
504 struct ucred *cred)
2d3e977e
MD
505{
506 struct vop_write_args ap;
cbe54d63 507 int error;
2d3e977e
MD
508
509 ap.a_head.a_desc = &vop_write_desc;
0961aa92 510 ap.a_head.a_ops = ops;
2d3e977e
MD
511 ap.a_vp = vp;
512 ap.a_uio = uio;
513 ap.a_ioflag = ioflag;
514 ap.a_cred = cred;
cbe54d63
MD
515
516 DO_OPS(ops, error, &ap, vop_write);
7d15906a
MD
517 if (error == 0)
518 cache_update_fsmid_vp(vp);
cbe54d63 519 return(error);
2d3e977e
MD
520}
521
2d3e977e 522int
0961aa92 523vop_ioctl(struct vop_ops *ops, struct vnode *vp, u_long command, caddr_t data,
87de5057 524 int fflag, struct ucred *cred)
2d3e977e
MD
525{
526 struct vop_ioctl_args ap;
cbe54d63 527 int error;
2d3e977e
MD
528
529 ap.a_head.a_desc = &vop_ioctl_desc;
0961aa92 530 ap.a_head.a_ops = ops;
2d3e977e
MD
531 ap.a_vp = vp;
532 ap.a_command = command;
533 ap.a_data = data;
534 ap.a_fflag = fflag;
535 ap.a_cred = cred;
cbe54d63
MD
536
537 DO_OPS(ops, error, &ap, vop_ioctl);
538 return(error);
2d3e977e
MD
539}
540
541int
87de5057 542vop_poll(struct vop_ops *ops, struct vnode *vp, int events, struct ucred *cred)
2d3e977e
MD
543{
544 struct vop_poll_args ap;
cbe54d63 545 int error;
2d3e977e
MD
546
547 ap.a_head.a_desc = &vop_poll_desc;
0961aa92 548 ap.a_head.a_ops = ops;
2d3e977e
MD
549 ap.a_vp = vp;
550 ap.a_events = events;
551 ap.a_cred = cred;
cbe54d63
MD
552
553 DO_OPS(ops, error, &ap, vop_poll);
554 return(error);
2d3e977e
MD
555}
556
557int
0961aa92 558vop_kqfilter(struct vop_ops *ops, struct vnode *vp, struct knote *kn)
2d3e977e
MD
559{
560 struct vop_kqfilter_args ap;
cbe54d63 561 int error;
2d3e977e
MD
562
563 ap.a_head.a_desc = &vop_kqfilter_desc;
0961aa92 564 ap.a_head.a_ops = ops;
2d3e977e
MD
565 ap.a_vp = vp;
566 ap.a_kn = kn;
cbe54d63
MD
567
568 DO_OPS(ops, error, &ap, vop_kqfilter);
569 return(error);
2d3e977e
MD
570}
571
572int
0961aa92 573vop_revoke(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
574{
575 struct vop_revoke_args ap;
cbe54d63 576 int error;
2d3e977e
MD
577
578 ap.a_head.a_desc = &vop_revoke_desc;
0961aa92 579 ap.a_head.a_ops = ops;
2d3e977e
MD
580 ap.a_vp = vp;
581 ap.a_flags = flags;
cbe54d63
MD
582
583 DO_OPS(ops, error, &ap, vop_revoke);
584 return(error);
2d3e977e
MD
585}
586
587int
87de5057 588vop_mmap(struct vop_ops *ops, struct vnode *vp, int fflags, struct ucred *cred)
2d3e977e
MD
589{
590 struct vop_mmap_args ap;
cbe54d63 591 int error;
2d3e977e
MD
592
593 ap.a_head.a_desc = &vop_mmap_desc;
0961aa92 594 ap.a_head.a_ops = ops;
2d3e977e
MD
595 ap.a_vp = vp;
596 ap.a_fflags = fflags;
597 ap.a_cred = cred;
cbe54d63
MD
598
599 DO_OPS(ops, error, &ap, vop_mmap);
600 return(error);
2d3e977e
MD
601}
602
603int
87de5057 604vop_fsync(struct vop_ops *ops, struct vnode *vp, int waitfor)
2d3e977e
MD
605{
606 struct vop_fsync_args ap;
cbe54d63 607 int error;
2d3e977e
MD
608
609 ap.a_head.a_desc = &vop_fsync_desc;
0961aa92 610 ap.a_head.a_ops = ops;
2d3e977e
MD
611 ap.a_vp = vp;
612 ap.a_waitfor = waitfor;
cbe54d63
MD
613
614 DO_OPS(ops, error, &ap, vop_fsync);
615 return(error);
2d3e977e
MD
616}
617
618int
e62afb5f 619vop_old_remove(struct vop_ops *ops, struct vnode *dvp,
0961aa92 620 struct vnode *vp, struct componentname *cnp)
2d3e977e 621{
e62afb5f 622 struct vop_old_remove_args ap;
cbe54d63 623 int error;
2d3e977e 624
e62afb5f 625 ap.a_head.a_desc = &vop_old_remove_desc;
0961aa92 626 ap.a_head.a_ops = ops;
2d3e977e 627 ap.a_dvp = dvp;
2d3e977e
MD
628 ap.a_vp = vp;
629 ap.a_cnp = cnp;
cbe54d63 630
e62afb5f 631 DO_OPS(ops, error, &ap, vop_old_remove);
cbe54d63 632 return(error);
2d3e977e
MD
633}
634
21739618 635int
e62afb5f 636vop_old_link(struct vop_ops *ops, struct vnode *tdvp,
0961aa92 637 struct vnode *vp, struct componentname *cnp)
2d3e977e 638{
e62afb5f 639 struct vop_old_link_args ap;
cbe54d63 640 int error;
2d3e977e 641
e62afb5f 642 ap.a_head.a_desc = &vop_old_link_desc;
0961aa92 643 ap.a_head.a_ops = ops;
2d3e977e 644 ap.a_tdvp = tdvp;
2d3e977e
MD
645 ap.a_vp = vp;
646 ap.a_cnp = cnp;
cbe54d63 647
e62afb5f 648 DO_OPS(ops, error, &ap, vop_old_link);
cbe54d63 649 return(error);
2d3e977e
MD
650}
651
652int
e62afb5f 653vop_old_rename(struct vop_ops *ops,
fad57d0e
MD
654 struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp,
655 struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp)
2d3e977e 656{
e62afb5f 657 struct vop_old_rename_args ap;
cbe54d63 658 int error;
2d3e977e 659
e62afb5f 660 ap.a_head.a_desc = &vop_old_rename_desc;
0961aa92 661 ap.a_head.a_ops = ops;
2d3e977e 662 ap.a_fdvp = fdvp;
2d3e977e
MD
663 ap.a_fvp = fvp;
664 ap.a_fcnp = fcnp;
665 ap.a_tdvp = tdvp;
2d3e977e
MD
666 ap.a_tvp = tvp;
667 ap.a_tcnp = tcnp;
cbe54d63 668
e62afb5f 669 DO_OPS(ops, error, &ap, vop_old_rename);
cbe54d63 670 return(error);
2d3e977e
MD
671}
672
673int
e62afb5f 674vop_old_mkdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 675 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e 676{
e62afb5f 677 struct vop_old_mkdir_args ap;
cbe54d63 678 int error;
2d3e977e 679
e62afb5f 680 ap.a_head.a_desc = &vop_old_mkdir_desc;
0961aa92 681 ap.a_head.a_ops = ops;
2d3e977e 682 ap.a_dvp = dvp;
2d3e977e
MD
683 ap.a_vpp = vpp;
684 ap.a_cnp = cnp;
685 ap.a_vap = vap;
cbe54d63 686
e62afb5f 687 DO_OPS(ops, error, &ap, vop_old_mkdir);
cbe54d63 688 return(error);
2d3e977e
MD
689}
690
691int
e62afb5f 692vop_old_rmdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 693 struct vnode *vp, struct componentname *cnp)
2d3e977e 694{
e62afb5f 695 struct vop_old_rmdir_args ap;
cbe54d63 696 int error;
2d3e977e 697
e62afb5f 698 ap.a_head.a_desc = &vop_old_rmdir_desc;
0961aa92 699 ap.a_head.a_ops = ops;
2d3e977e 700 ap.a_dvp = dvp;
2d3e977e
MD
701 ap.a_vp = vp;
702 ap.a_cnp = cnp;
cbe54d63 703
e62afb5f 704 DO_OPS(ops, error, &ap, vop_old_rmdir);
cbe54d63 705 return(error);
2d3e977e
MD
706}
707
708int
e62afb5f 709vop_old_symlink(struct vop_ops *ops, struct vnode *dvp,
0961aa92
MD
710 struct vnode **vpp, struct componentname *cnp,
711 struct vattr *vap, char *target)
2d3e977e 712{
e62afb5f 713 struct vop_old_symlink_args ap;
cbe54d63 714 int error;
2d3e977e 715
e62afb5f 716 ap.a_head.a_desc = &vop_old_symlink_desc;
0961aa92 717 ap.a_head.a_ops = ops;
2d3e977e 718 ap.a_dvp = dvp;
2d3e977e
MD
719 ap.a_vpp = vpp;
720 ap.a_cnp = cnp;
721 ap.a_vap = vap;
722 ap.a_target = target;
cbe54d63 723
e62afb5f 724 DO_OPS(ops, error, &ap, vop_old_symlink);
cbe54d63 725 return(error);
2d3e977e
MD
726}
727
728int
0961aa92
MD
729vop_readdir(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
730 struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies)
2d3e977e
MD
731{
732 struct vop_readdir_args ap;
cbe54d63 733 int error;
2d3e977e
MD
734
735 ap.a_head.a_desc = &vop_readdir_desc;
0961aa92 736 ap.a_head.a_ops = ops;
2d3e977e
MD
737 ap.a_vp = vp;
738 ap.a_uio = uio;
739 ap.a_cred = cred;
740 ap.a_eofflag = eofflag;
741 ap.a_ncookies = ncookies;
742 ap.a_cookies = cookies;
cbe54d63
MD
743
744 DO_OPS(ops, error, &ap, vop_readdir);
745 return(error);
2d3e977e
MD
746}
747
748int
0961aa92
MD
749vop_readlink(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
750 struct ucred *cred)
2d3e977e
MD
751{
752 struct vop_readlink_args ap;
cbe54d63 753 int error;
2d3e977e
MD
754
755 ap.a_head.a_desc = &vop_readlink_desc;
0961aa92 756 ap.a_head.a_ops = ops;
2d3e977e
MD
757 ap.a_vp = vp;
758 ap.a_uio = uio;
759 ap.a_cred = cred;
cbe54d63
MD
760
761 DO_OPS(ops, error, &ap, vop_readlink);
762 return(error);
2d3e977e
MD
763}
764
765int
87de5057 766vop_inactive(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
767{
768 struct vop_inactive_args ap;
cbe54d63 769 int error;
2d3e977e
MD
770
771 ap.a_head.a_desc = &vop_inactive_desc;
0961aa92 772 ap.a_head.a_ops = ops;
2d3e977e 773 ap.a_vp = vp;
cbe54d63
MD
774
775 DO_OPS(ops, error, &ap, vop_inactive);
776 return(error);
2d3e977e
MD
777}
778
779int
87de5057 780vop_reclaim(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
781{
782 struct vop_reclaim_args ap;
cbe54d63 783 int error;
2d3e977e
MD
784
785 ap.a_head.a_desc = &vop_reclaim_desc;
0961aa92 786 ap.a_head.a_ops = ops;
2d3e977e 787 ap.a_vp = vp;
cbe54d63
MD
788
789 DO_OPS(ops, error, &ap, vop_reclaim);
790 return(error);
2d3e977e
MD
791}
792
793int
ca466bae 794vop_lock(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
795{
796 struct vop_lock_args ap;
cbe54d63 797 int error;
2d3e977e
MD
798
799 ap.a_head.a_desc = &vop_lock_desc;
0961aa92 800 ap.a_head.a_ops = ops;
2d3e977e 801 ap.a_vp = vp;
2d3e977e 802 ap.a_flags = flags;
cbe54d63
MD
803
804 DO_OPS(ops, error, &ap, vop_lock);
805 return(error);
2d3e977e
MD
806}
807
808int
ca466bae 809vop_unlock(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
810{
811 struct vop_unlock_args ap;
cbe54d63 812 int error;
2d3e977e
MD
813
814 ap.a_head.a_desc = &vop_unlock_desc;
0961aa92 815 ap.a_head.a_ops = ops;
2d3e977e 816 ap.a_vp = vp;
2d3e977e 817 ap.a_flags = flags;
cbe54d63
MD
818
819 DO_OPS(ops, error, &ap, vop_unlock);
820 return(error);
2d3e977e
MD
821}
822
823int
54078292
MD
824vop_bmap(struct vop_ops *ops, struct vnode *vp, off_t loffset,
825 struct vnode **vpp, off_t *doffsetp, int *runp, int *runb)
2d3e977e
MD
826{
827 struct vop_bmap_args ap;
cbe54d63 828 int error;
2d3e977e
MD
829
830 ap.a_head.a_desc = &vop_bmap_desc;
0961aa92 831 ap.a_head.a_ops = ops;
2d3e977e 832 ap.a_vp = vp;
54078292 833 ap.a_loffset = loffset;
2d3e977e 834 ap.a_vpp = vpp;
54078292 835 ap.a_doffsetp = doffsetp;
2d3e977e
MD
836 ap.a_runp = runp;
837 ap.a_runb = runb;
cbe54d63
MD
838
839 DO_OPS(ops, error, &ap, vop_bmap);
840 return(error);
2d3e977e
MD
841}
842
843int
81b5c339 844vop_strategy(struct vop_ops *ops, struct vnode *vp, struct bio *bio)
2d3e977e
MD
845{
846 struct vop_strategy_args ap;
cbe54d63 847 int error;
2d3e977e
MD
848
849 ap.a_head.a_desc = &vop_strategy_desc;
0961aa92 850 ap.a_head.a_ops = ops;
2d3e977e 851 ap.a_vp = vp;
81b5c339 852 ap.a_bio = bio;
cbe54d63
MD
853
854 DO_OPS(ops, error, &ap, vop_strategy);
10f3fee5 855 if (error == 0 && bio->bio_buf->b_cmd != BUF_CMD_READ)
7d15906a 856 cache_update_fsmid_vp(vp);
cbe54d63 857 return(error);
2d3e977e
MD
858}
859
860int
0961aa92 861vop_print(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
862{
863 struct vop_print_args ap;
cbe54d63 864 int error;
2d3e977e
MD
865
866 ap.a_head.a_desc = &vop_print_desc;
0961aa92 867 ap.a_head.a_ops = ops;
2d3e977e 868 ap.a_vp = vp;
cbe54d63
MD
869
870 DO_OPS(ops, error, &ap, vop_print);
871 return(error);
2d3e977e
MD
872}
873
874int
0961aa92
MD
875vop_pathconf(struct vop_ops *ops, struct vnode *vp, int name,
876 register_t *retval)
2d3e977e
MD
877{
878 struct vop_pathconf_args ap;
cbe54d63 879 int error;
2d3e977e
MD
880
881 ap.a_head.a_desc = &vop_pathconf_desc;
0961aa92 882 ap.a_head.a_ops = ops;
2d3e977e
MD
883 ap.a_vp = vp;
884 ap.a_name = name;
885 ap.a_retval = retval;
cbe54d63
MD
886
887 DO_OPS(ops, error, &ap, vop_pathconf);
888 return(error);
2d3e977e
MD
889}
890
891int
0961aa92
MD
892vop_advlock(struct vop_ops *ops, struct vnode *vp, caddr_t id, int op,
893 struct flock *fl, int flags)
2d3e977e
MD
894{
895 struct vop_advlock_args ap;
cbe54d63 896 int error;
2d3e977e
MD
897
898 ap.a_head.a_desc = &vop_advlock_desc;
0961aa92 899 ap.a_head.a_ops = ops;
2d3e977e
MD
900 ap.a_vp = vp;
901 ap.a_id = id;
902 ap.a_op = op;
903 ap.a_fl = fl;
904 ap.a_flags = flags;
cbe54d63
MD
905
906 DO_OPS(ops, error, &ap, vop_advlock);
907 return(error);
2d3e977e
MD
908}
909
910int
0961aa92
MD
911vop_balloc(struct vop_ops *ops, struct vnode *vp, off_t startoffset,
912 int size, struct ucred *cred, int flags,
913 struct buf **bpp)
2d3e977e
MD
914{
915 struct vop_balloc_args ap;
cbe54d63 916 int error;
2d3e977e
MD
917
918 ap.a_head.a_desc = &vop_balloc_desc;
0961aa92 919 ap.a_head.a_ops = ops;
2d3e977e
MD
920 ap.a_vp = vp;
921 ap.a_startoffset = startoffset;
922 ap.a_size = size;
923 ap.a_cred = cred;
924 ap.a_flags = flags;
925 ap.a_bpp = bpp;
cbe54d63
MD
926
927 DO_OPS(ops, error, &ap, vop_balloc);
928 return(error);
2d3e977e
MD
929}
930
931int
0961aa92
MD
932vop_reallocblks(struct vop_ops *ops, struct vnode *vp,
933 struct cluster_save *buflist)
2d3e977e
MD
934{
935 struct vop_reallocblks_args ap;
cbe54d63 936 int error;
2d3e977e
MD
937
938 ap.a_head.a_desc = &vop_reallocblks_desc;
0961aa92 939 ap.a_head.a_ops = ops;
2d3e977e
MD
940 ap.a_vp = vp;
941 ap.a_buflist = buflist;
cbe54d63
MD
942
943 DO_OPS(ops, error, &ap, vop_reallocblks);
944 return(error);
2d3e977e
MD
945}
946
947int
0961aa92
MD
948vop_getpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
949 int reqpage, vm_ooffset_t offset)
2d3e977e
MD
950{
951 struct vop_getpages_args ap;
cbe54d63 952 int error;
2d3e977e
MD
953
954 ap.a_head.a_desc = &vop_getpages_desc;
0961aa92 955 ap.a_head.a_ops = ops;
2d3e977e
MD
956 ap.a_vp = vp;
957 ap.a_m = m;
958 ap.a_count = count;
959 ap.a_reqpage = reqpage;
960 ap.a_offset = offset;
cbe54d63
MD
961
962 DO_OPS(ops, error, &ap, vop_getpages);
963 return(error);
2d3e977e
MD
964}
965
966int
0961aa92
MD
967vop_putpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
968 int sync, int *rtvals, vm_ooffset_t offset)
2d3e977e
MD
969{
970 struct vop_putpages_args ap;
cbe54d63 971 int error;
2d3e977e
MD
972
973 ap.a_head.a_desc = &vop_putpages_desc;
0961aa92 974 ap.a_head.a_ops = ops;
2d3e977e
MD
975 ap.a_vp = vp;
976 ap.a_m = m;
977 ap.a_count = count;
978 ap.a_sync = sync;
979 ap.a_rtvals = rtvals;
980 ap.a_offset = offset;
cbe54d63
MD
981
982 DO_OPS(ops, error, &ap, vop_putpages);
7d15906a
MD
983 if (error == 0)
984 cache_update_fsmid_vp(vp);
cbe54d63 985 return(error);
2d3e977e
MD
986}
987
988int
54078292 989vop_freeblks(struct vop_ops *ops, struct vnode *vp, off_t offset, int length)
2d3e977e
MD
990{
991 struct vop_freeblks_args ap;
cbe54d63 992 int error;
2d3e977e
MD
993
994 ap.a_head.a_desc = &vop_freeblks_desc;
0961aa92 995 ap.a_head.a_ops = ops;
2d3e977e 996 ap.a_vp = vp;
54078292 997 ap.a_offset = offset;
2d3e977e 998 ap.a_length = length;
cbe54d63
MD
999
1000 DO_OPS(ops, error, &ap, vop_freeblks);
1001 return(error);
2d3e977e
MD
1002}
1003
2d3e977e 1004int
0961aa92 1005vop_getacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
87de5057 1006 struct acl *aclp, struct ucred *cred)
2d3e977e
MD
1007{
1008 struct vop_getacl_args ap;
cbe54d63 1009 int error;
2d3e977e
MD
1010
1011 ap.a_head.a_desc = &vop_getacl_desc;
0961aa92 1012 ap.a_head.a_ops = ops;
2d3e977e
MD
1013 ap.a_vp = vp;
1014 ap.a_type = type;
1015 ap.a_aclp = aclp;
1016 ap.a_cred = cred;
cbe54d63
MD
1017
1018 DO_OPS(ops, error, &ap, vop_getacl);
1019 return(error);
2d3e977e
MD
1020}
1021
1022int
0961aa92 1023vop_setacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
87de5057 1024 struct acl *aclp, struct ucred *cred)
2d3e977e
MD
1025{
1026 struct vop_setacl_args ap;
cbe54d63 1027 int error;
2d3e977e
MD
1028
1029 ap.a_head.a_desc = &vop_setacl_desc;
0961aa92 1030 ap.a_head.a_ops = ops;
2d3e977e
MD
1031 ap.a_vp = vp;
1032 ap.a_type = type;
1033 ap.a_aclp = aclp;
1034 ap.a_cred = cred;
cbe54d63
MD
1035
1036 DO_OPS(ops, error, &ap, vop_setacl);
7d15906a
MD
1037 if (error == 0)
1038 cache_update_fsmid_vp(vp);
cbe54d63 1039 return(error);
2d3e977e
MD
1040}
1041
1042int
0961aa92 1043vop_aclcheck(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
87de5057 1044 struct acl *aclp, struct ucred *cred)
2d3e977e
MD
1045{
1046 struct vop_aclcheck_args ap;
cbe54d63 1047 int error;
2d3e977e
MD
1048
1049 ap.a_head.a_desc = &vop_aclcheck_desc;
0961aa92 1050 ap.a_head.a_ops = ops;
2d3e977e
MD
1051 ap.a_vp = vp;
1052 ap.a_type = type;
1053 ap.a_aclp = aclp;
1054 ap.a_cred = cred;
cbe54d63
MD
1055
1056 DO_OPS(ops, error, &ap, vop_aclcheck);
1057 return(error);
2d3e977e
MD
1058}
1059
1060int
0961aa92 1061vop_getextattr(struct vop_ops *ops, struct vnode *vp, char *name,
87de5057 1062 struct uio *uio, struct ucred *cred)
2d3e977e
MD
1063{
1064 struct vop_getextattr_args ap;
cbe54d63 1065 int error;
2d3e977e
MD
1066
1067 ap.a_head.a_desc = &vop_getextattr_desc;
0961aa92 1068 ap.a_head.a_ops = ops;
2d3e977e
MD
1069 ap.a_vp = vp;
1070 ap.a_name = name;
1071 ap.a_uio = uio;
1072 ap.a_cred = cred;
cbe54d63
MD
1073
1074 DO_OPS(ops, error, &ap, vop_getextattr);
1075 return(error);
2d3e977e
MD
1076}
1077
1078int
0961aa92 1079vop_setextattr(struct vop_ops *ops, struct vnode *vp, char *name,
87de5057 1080 struct uio *uio, struct ucred *cred)
2d3e977e
MD
1081{
1082 struct vop_setextattr_args ap;
cbe54d63 1083 int error;
2d3e977e
MD
1084
1085 ap.a_head.a_desc = &vop_setextattr_desc;
0961aa92 1086 ap.a_head.a_ops = ops;
2d3e977e
MD
1087 ap.a_vp = vp;
1088 ap.a_name = name;
1089 ap.a_uio = uio;
1090 ap.a_cred = cred;
cbe54d63
MD
1091
1092 DO_OPS(ops, error, &ap, vop_setextattr);
7d15906a
MD
1093 if (error == 0)
1094 cache_update_fsmid_vp(vp);
cbe54d63 1095 return(error);
2d3e977e
MD
1096}
1097
cbe54d63 1098int
2281065e
MD
1099vop_mountctl(struct vop_ops *ops, int op, struct file *fp,
1100 const void *ctl, int ctllen, void *buf, int buflen, int *res)
cbe54d63 1101{
949ecb9b 1102 struct vop_mountctl_args ap;
cbe54d63
MD
1103 int error;
1104
949ecb9b 1105 ap.a_head.a_desc = &vop_mountctl_desc;
cbe54d63
MD
1106 ap.a_head.a_ops = ops;
1107 ap.a_op = op;
949ecb9b 1108 ap.a_ctl = ctl;
2281065e 1109 ap.a_fp = fp;
949ecb9b
MD
1110 ap.a_ctllen = ctllen;
1111 ap.a_buf = buf;
1112 ap.a_buflen = buflen;
1113 ap.a_res = res;
cbe54d63 1114
949ecb9b 1115 DO_OPS(ops, error, &ap, vop_mountctl);
cbe54d63 1116 return(error);
0961aa92
MD
1117}
1118
fad57d0e
MD
1119/*
1120 * NEW API FUNCTIONS
1121 *
1122 * nresolve takes a locked ncp and a cred and resolves the ncp into a
1123 * positive or negative hit.
1124 *
1125 * The namecache is automatically adjusted by this function. The ncp
1126 * is left locked on return.
1127 */
1128int
1129vop_nresolve(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1130{
1131 struct vop_nresolve_args ap;
1132 int error;
1133
1134 ap.a_head.a_desc = &vop_nresolve_desc;
1135 ap.a_head.a_ops = ops;
1136 ap.a_ncp = ncp;
1137 ap.a_cred = cred;
1138
1139 DO_OPS(ops, error, &ap, vop_nresolve);
1140 return(error);
1141}
1142
1143/*
1144 * nlookupdotdot takes an unlocked directory, dvp, and looks up "..", returning
1145 * a locked parent directory in *vpp. If an error occurs *vpp will be NULL.
1146 */
1147int
1148vop_nlookupdotdot(struct vop_ops *ops, struct vnode *dvp,
1149 struct vnode **vpp, struct ucred *cred)
1150{
1151 struct vop_nlookupdotdot_args ap;
1152 int error;
1153
1154 ap.a_head.a_desc = &vop_nlookupdotdot_desc;
1155 ap.a_head.a_ops = ops;
1156 ap.a_dvp = dvp;
1157 ap.a_vpp = vpp;
1158 ap.a_cred = cred;
1159
1160 DO_OPS(ops, error, &ap, vop_nlookupdotdot);
1161 return(error);
1162}
1163
1164/*
1165 * ncreate takes a locked, resolved ncp that typically represents a negative
1166 * cache hit and creates the file or node specified by the ncp, cred, and
1167 * vattr. If no error occurs a locked vnode is returned in *vpp.
1168 *
1169 * The namecache is automatically adjusted by this function. The ncp
1170 * is left locked on return.
1171 */
1172int
1173vop_ncreate(struct vop_ops *ops, struct namecache *ncp,
1174 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1175{
1176 struct vop_ncreate_args ap;
1177 int error;
1178
1179 ap.a_head.a_desc = &vop_ncreate_desc;
1180 ap.a_head.a_ops = ops;
1181 ap.a_ncp = ncp;
1182 ap.a_vpp = vpp;
1183 ap.a_cred = cred;
1184 ap.a_vap = vap;
1185
1186 DO_OPS(ops, error, &ap, vop_ncreate);
7d15906a
MD
1187 if (error == 0 && *vpp)
1188 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1189 return(error);
1190}
1191
1192/*
1193 * nmkdir takes a locked, resolved ncp that typically represents a negative
1194 * cache hit and creates the directory specified by the ncp, cred, and
1195 * vattr. If no error occurs a locked vnode is returned in *vpp.
1196 *
1197 * The namecache is automatically adjusted by this function. The ncp
1198 * is left locked on return.
1199 */
1200int
1201vop_nmkdir(struct vop_ops *ops, struct namecache *ncp,
1202 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1203{
1204 struct vop_nmkdir_args ap;
1205 int error;
1206
1207 ap.a_head.a_desc = &vop_nmkdir_desc;
1208 ap.a_head.a_ops = ops;
1209 ap.a_ncp = ncp;
1210 ap.a_vpp = vpp;
1211 ap.a_cred = cred;
1212 ap.a_vap = vap;
1213
1214 DO_OPS(ops, error, &ap, vop_nmkdir);
7d15906a
MD
1215 if (error == 0 && *vpp)
1216 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1217 return(error);
1218}
1219
1220/*
1221 * nmknod takes a locked, resolved ncp that typically represents a negative
1222 * cache hit and creates the node specified by the ncp, cred, and
1223 * vattr. If no error occurs a locked vnode is returned in *vpp.
1224 *
1225 * The namecache is automatically adjusted by this function. The ncp
1226 * is left locked on return.
1227 */
1228int
1229vop_nmknod(struct vop_ops *ops, struct namecache *ncp,
1230 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1231{
1232 struct vop_nmknod_args ap;
1233 int error;
1234
1235 ap.a_head.a_desc = &vop_nmknod_desc;
1236 ap.a_head.a_ops = ops;
1237 ap.a_ncp = ncp;
1238 ap.a_vpp = vpp;
1239 ap.a_cred = cred;
1240 ap.a_vap = vap;
1241
1242 DO_OPS(ops, error, &ap, vop_nmknod);
7d15906a
MD
1243 if (error == 0 && *vpp)
1244 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1245 return(error);
1246}
1247
1248/*
1249 * nlink takes a locked, resolved ncp that typically represents a negative
1250 * cache hit and creates the node specified by the ncp, cred, and
1251 * existing vnode. The passed vp must be locked and will remain locked
1252 * on return, as does the ncp, whether an error occurs or not.
1253 *
1254 * The namecache is automatically adjusted by this function. The ncp
1255 * is left locked on return.
1256 */
1257int
1258vop_nlink(struct vop_ops *ops, struct namecache *ncp,
1259 struct vnode *vp, struct ucred *cred)
1260{
1261 struct vop_nlink_args ap;
1262 int error;
1263
1264 ap.a_head.a_desc = &vop_nlink_desc;
1265 ap.a_head.a_ops = ops;
1266 ap.a_ncp = ncp;
1267 ap.a_vp = vp;
1268 ap.a_cred = cred;
1269
1270 DO_OPS(ops, error, &ap, vop_nlink);
7d15906a
MD
1271 if (error == 0)
1272 cache_update_fsmid(ncp);
fad57d0e
MD
1273 return(error);
1274}
1275
1276/*
1277 * nsymlink takes a locked, resolved ncp that typically represents a negative
1278 * cache hit and creates a symbolic link based on cred, vap, and target (the
1279 * contents of the link). If no error occurs a locked vnode is returned in
1280 * *vpp.
1281 *
1282 * The namecache is automatically adjusted by this function. The ncp
1283 * is left locked on return.
1284 */
1285int
1286vop_nsymlink(struct vop_ops *ops, struct namecache *ncp,
1287 struct vnode **vpp, struct ucred *cred,
1288 struct vattr *vap, char *target)
1289{
1290 struct vop_nsymlink_args ap;
1291 int error;
1292
1293 ap.a_head.a_desc = &vop_nsymlink_desc;
1294 ap.a_head.a_ops = ops;
1295 ap.a_ncp = ncp;
1296 ap.a_vpp = vpp;
1297 ap.a_cred = cred;
1298 ap.a_vap = vap;
1299 ap.a_target = target;
1300
1301 DO_OPS(ops, error, &ap, vop_nsymlink);
7d15906a
MD
1302 if (error == 0)
1303 cache_update_fsmid(ncp);
fad57d0e
MD
1304 return(error);
1305}
1306
1307/*
1308 * nwhiteout takes a locked, resolved ncp that can represent a positive or
1309 * negative hit and executes the whiteout function specified in flags.
1310 *
1311 * The namecache is automatically adjusted by this function. The ncp
1312 * is left locked on return.
1313 */
1314int
1315vop_nwhiteout(struct vop_ops *ops, struct namecache *ncp,
1316 struct ucred *cred, int flags)
1317{
1318 struct vop_nwhiteout_args ap;
1319 int error;
1320
1321 ap.a_head.a_desc = &vop_nwhiteout_desc;
1322 ap.a_head.a_ops = ops;
1323 ap.a_ncp = ncp;
1324 ap.a_cred = cred;
1325 ap.a_flags = flags;
1326
1327 DO_OPS(ops, error, &ap, vop_nwhiteout);
7d15906a
MD
1328 if (error == 0)
1329 cache_update_fsmid(ncp);
fad57d0e
MD
1330 return(error);
1331}
1332
1333/*
1334 * nremove takes a locked, resolved ncp that generally represents a
1335 * positive hit and removes the file.
1336 *
1337 * The namecache is automatically adjusted by this function. The ncp
1338 * is left locked on return.
1339 */
1340int
1341vop_nremove(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1342{
1343 struct vop_nremove_args ap;
1344 int error;
1345
1346 ap.a_head.a_desc = &vop_nremove_desc;
1347 ap.a_head.a_ops = ops;
1348 ap.a_ncp = ncp;
1349 ap.a_cred = cred;
1350
1351 DO_OPS(ops, error, &ap, vop_nremove);
7d15906a
MD
1352 if (error == 0)
1353 cache_update_fsmid(ncp);
fad57d0e
MD
1354 return(error);
1355}
1356
1357/*
1358 * nrmdir takes a locked, resolved ncp that generally represents a
1359 * directory and removes the directory.
1360 *
1361 * The namecache is automatically adjusted by this function. The ncp
1362 * is left locked on return.
1363 */
1364int
1365vop_nrmdir(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1366{
1367 struct vop_nrmdir_args ap;
1368 int error;
1369
1370 ap.a_head.a_desc = &vop_nrmdir_desc;
1371 ap.a_head.a_ops = ops;
1372 ap.a_ncp = ncp;
1373 ap.a_cred = cred;
1374
1375 DO_OPS(ops, error, &ap, vop_nrmdir);
7d15906a
MD
1376 if (error == 0)
1377 cache_update_fsmid(ncp);
fad57d0e
MD
1378 return(error);
1379}
1380
1381/*
1382 * nrename takes TWO locked, resolved ncp's and the cred of the caller
1383 * and renames the source ncp to the target ncp. The target ncp may
1384 * represent a positive or negative hit.
1385 *
1386 * The namecache is automatically adjusted by this function. The ncp
1387 * is left locked on return. The source ncp is typically changed to
1388 * a negative cache hit and the target ncp typically takes on the
1389 * source ncp's underlying file.
1390 */
1391int
1392vop_nrename(struct vop_ops *ops, struct namecache *fncp,
1393 struct namecache *tncp, struct ucred *cred)
1394{
1395 struct vop_nrename_args ap;
1396 int error;
1397
1398 ap.a_head.a_desc = &vop_nrename_desc;
1399 ap.a_head.a_ops = ops;
1400 ap.a_fncp = fncp;
1401 ap.a_tncp = tncp;
1402 ap.a_cred = cred;
1403
1404 DO_OPS(ops, error, &ap, vop_nrename);
7d15906a
MD
1405 if (error == 0) {
1406 cache_update_fsmid(fncp);
1407 cache_update_fsmid(tncp);
1408 }
fad57d0e
MD
1409 return(error);
1410}
1411
0961aa92
MD
1412/************************************************************************
1413 * PRIMARY VNODE OPERATIONS FORWARDING CALLS *
1414 ************************************************************************
1415 *
1416 * These procedures are called from VFSs such as unionfs and nullfs
1417 * when they wish to forward an operation on one VFS to another. The
1418 * argument structure/message is modified and then directly passed to the
1419 * appropriate routine. This routines may also be called by initiators
1420 * who have an argument structure in hand rather then discreet arguments.
1421 */
1422int
1423vop_vnoperate_ap(struct vop_generic_args *ap)
1424{
cbe54d63
MD
1425 struct vop_ops *ops;
1426 int error;
1427
1428 ops = ap->a_ops;
6ddb7618
MD
1429 error = VOCALL(ops, ap);
1430
1431 return (error);
1432}
1433
1434/*
1435 * This routine is called by the cache coherency layer to execute the actual
1436 * VFS operation. If a journaling layer is present we call though it, else
1437 * we call the native VOP functions.
1438 */
1439int
1440vop_cache_operate_ap(struct vop_generic_args *ap)
1441{
1442 struct vop_ops *ops;
1443 int error;
1444
1445 ops = ap->a_ops;
1446 if (ops->vv_mount->mnt_vn_journal_ops)
1447 error = VOCALL(ops->vv_mount->mnt_vn_journal_ops, ap);
1448 else
1449 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1450 return (error);
1451}
1452
1453
1454/*
1455 * This routine is called by the journaling layer to execute the actual
1456 * VFS operation.
1457 */
1458int
1459vop_journal_operate_ap(struct vop_generic_args *ap)
1460{
1461 struct vop_ops *ops;
1462 int error;
1463
1464 ops = ap->a_ops;
1465 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1466
cbe54d63 1467 return (error);
0961aa92
MD
1468}
1469
1470int
1471vop_islocked_ap(struct vop_islocked_args *ap)
1472{
cbe54d63
MD
1473 int error;
1474
1475 DO_OPS(ap->a_head.a_ops, error, ap, vop_islocked);
1476 return(error);
0961aa92
MD
1477}
1478
0961aa92
MD
1479int
1480vop_open_ap(struct vop_open_args *ap)
1481{
cbe54d63
MD
1482 int error;
1483
1484 DO_OPS(ap->a_head.a_ops, error, ap, vop_open);
1485 return(error);
0961aa92
MD
1486}
1487
1488int
1489vop_close_ap(struct vop_close_args *ap)
1490{
cbe54d63
MD
1491 int error;
1492
1493 DO_OPS(ap->a_head.a_ops, error, ap, vop_close);
1494 return(error);
0961aa92
MD
1495}
1496
1497int
1498vop_access_ap(struct vop_access_args *ap)
1499{
cbe54d63
MD
1500 int error;
1501
1502 DO_OPS(ap->a_head.a_ops, error, ap, vop_access);
1503 return(error);
0961aa92
MD
1504}
1505
1506int
1507vop_getattr_ap(struct vop_getattr_args *ap)
1508{
cbe54d63
MD
1509 int error;
1510
1511 DO_OPS(ap->a_head.a_ops, error, ap, vop_getattr);
1512 return(error);
0961aa92
MD
1513}
1514
1515int
1516vop_setattr_ap(struct vop_setattr_args *ap)
1517{
cbe54d63
MD
1518 int error;
1519
1520 DO_OPS(ap->a_head.a_ops, error, ap, vop_setattr);
1521 return(error);
0961aa92
MD
1522}
1523
1524int
1525vop_read_ap(struct vop_read_args *ap)
1526{
cbe54d63
MD
1527 int error;
1528
1529 DO_OPS(ap->a_head.a_ops, error, ap, vop_read);
1530 return(error);
0961aa92
MD
1531}
1532
1533int
1534vop_write_ap(struct vop_write_args *ap)
1535{
cbe54d63
MD
1536 int error;
1537
1538 DO_OPS(ap->a_head.a_ops, error, ap, vop_write);
1539 return(error);
0961aa92
MD
1540}
1541
0961aa92
MD
1542int
1543vop_ioctl_ap(struct vop_ioctl_args *ap)
1544{
cbe54d63
MD
1545 int error;
1546
1547 DO_OPS(ap->a_head.a_ops, error, ap, vop_ioctl);
1548 return(error);
0961aa92
MD
1549}
1550
1551int
1552vop_poll_ap(struct vop_poll_args *ap)
1553{
cbe54d63
MD
1554 int error;
1555
1556 DO_OPS(ap->a_head.a_ops, error, ap, vop_poll);
1557 return(error);
0961aa92
MD
1558}
1559
1560int
1561vop_kqfilter_ap(struct vop_kqfilter_args *ap)
1562{
cbe54d63
MD
1563 int error;
1564
1565 DO_OPS(ap->a_head.a_ops, error, ap, vop_kqfilter);
1566 return(error);
0961aa92
MD
1567}
1568
1569int
1570vop_revoke_ap(struct vop_revoke_args *ap)
1571{
cbe54d63
MD
1572 int error;
1573
1574 DO_OPS(ap->a_head.a_ops, error, ap, vop_revoke);
1575 return(error);
0961aa92
MD
1576}
1577
1578int
1579vop_mmap_ap(struct vop_mmap_args *ap)
1580{
cbe54d63
MD
1581 int error;
1582
1583 DO_OPS(ap->a_head.a_ops, error, ap, vop_mmap);
1584 return(error);
0961aa92
MD
1585}
1586
1587int
1588vop_fsync_ap(struct vop_fsync_args *ap)
1589{
cbe54d63
MD
1590 int error;
1591
1592 DO_OPS(ap->a_head.a_ops, error, ap, vop_fsync);
1593 return(error);
0961aa92
MD
1594}
1595
0961aa92
MD
1596int
1597vop_readdir_ap(struct vop_readdir_args *ap)
1598{
cbe54d63
MD
1599 int error;
1600
1601 DO_OPS(ap->a_head.a_ops, error, ap, vop_readdir);
1602 return(error);
0961aa92
MD
1603}
1604
1605int
1606vop_readlink_ap(struct vop_readlink_args *ap)
1607{
cbe54d63
MD
1608 int error;
1609
1610 DO_OPS(ap->a_head.a_ops, error, ap, vop_readlink);
1611 return(error);
0961aa92
MD
1612}
1613
1614int
1615vop_inactive_ap(struct vop_inactive_args *ap)
1616{
cbe54d63
MD
1617 int error;
1618
1619 DO_OPS(ap->a_head.a_ops, error, ap, vop_inactive);
1620 return(error);
0961aa92
MD
1621}
1622
1623int
1624vop_reclaim_ap(struct vop_reclaim_args *ap)
1625{
cbe54d63
MD
1626 int error;
1627
1628 DO_OPS(ap->a_head.a_ops, error, ap, vop_reclaim);
1629 return(error);
0961aa92
MD
1630}
1631
1632int
1633vop_lock_ap(struct vop_lock_args *ap)
1634{
cbe54d63
MD
1635 int error;
1636
1637 DO_OPS(ap->a_head.a_ops, error, ap, vop_lock);
1638 return(error);
0961aa92
MD
1639}
1640
1641int
1642vop_unlock_ap(struct vop_unlock_args *ap)
1643{
cbe54d63
MD
1644 int error;
1645
1646 DO_OPS(ap->a_head.a_ops, error, ap, vop_unlock);
1647 return(error);
0961aa92
MD
1648}
1649
1650int
1651vop_bmap_ap(struct vop_bmap_args *ap)
1652{
cbe54d63
MD
1653 int error;
1654
1655 DO_OPS(ap->a_head.a_ops, error, ap, vop_bmap);
1656 return(error);
0961aa92
MD
1657}
1658
1659int
1660vop_strategy_ap(struct vop_strategy_args *ap)
1661{
cbe54d63
MD
1662 int error;
1663
1664 DO_OPS(ap->a_head.a_ops, error, ap, vop_strategy);
1665 return(error);
0961aa92
MD
1666}
1667
1668int
1669vop_print_ap(struct vop_print_args *ap)
1670{
cbe54d63
MD
1671 int error;
1672
1673 DO_OPS(ap->a_head.a_ops, error, ap, vop_print);
1674 return(error);
0961aa92
MD
1675}
1676
1677int
1678vop_pathconf_ap(struct vop_pathconf_args *ap)
1679{
cbe54d63
MD
1680 int error;
1681
1682 DO_OPS(ap->a_head.a_ops, error, ap, vop_pathconf);
1683 return(error);
0961aa92
MD
1684}
1685
1686int
1687vop_advlock_ap(struct vop_advlock_args *ap)
1688{
cbe54d63
MD
1689 int error;
1690
1691 DO_OPS(ap->a_head.a_ops, error, ap, vop_advlock);
1692 return(error);
0961aa92
MD
1693}
1694
1695int
1696vop_balloc_ap(struct vop_balloc_args *ap)
1697{
cbe54d63
MD
1698 int error;
1699
1700 DO_OPS(ap->a_head.a_ops, error, ap, vop_balloc);
1701 return(error);
0961aa92
MD
1702}
1703
1704int
1705vop_reallocblks_ap(struct vop_reallocblks_args *ap)
1706{
cbe54d63
MD
1707 int error;
1708
1709 DO_OPS(ap->a_head.a_ops, error, ap, vop_reallocblks);
1710 return(error);
0961aa92
MD
1711}
1712
1713int
1714vop_getpages_ap(struct vop_getpages_args *ap)
1715{
cbe54d63
MD
1716 int error;
1717
1718 DO_OPS(ap->a_head.a_ops, error, ap, vop_getpages);
1719 return(error);
0961aa92
MD
1720}
1721
1722int
1723vop_putpages_ap(struct vop_putpages_args *ap)
1724{
cbe54d63
MD
1725 int error;
1726
1727 DO_OPS(ap->a_head.a_ops, error, ap, vop_putpages);
1728 return(error);
0961aa92
MD
1729}
1730
1731int
1732vop_freeblks_ap(struct vop_freeblks_args *ap)
1733{
cbe54d63
MD
1734 int error;
1735
1736 DO_OPS(ap->a_head.a_ops, error, ap, vop_freeblks);
1737 return(error);
0961aa92
MD
1738}
1739
0961aa92
MD
1740int
1741vop_getacl_ap(struct vop_getacl_args *ap)
1742{
cbe54d63
MD
1743 int error;
1744
1745 DO_OPS(ap->a_head.a_ops, error, ap, vop_getacl);
1746 return(error);
0961aa92
MD
1747}
1748
1749int
1750vop_setacl_ap(struct vop_setacl_args *ap)
1751{
cbe54d63
MD
1752 int error;
1753
1754 DO_OPS(ap->a_head.a_ops, error, ap, vop_setacl);
1755 return(error);
0961aa92
MD
1756}
1757
1758int
1759vop_aclcheck_ap(struct vop_aclcheck_args *ap)
1760{
cbe54d63
MD
1761 int error;
1762
1763 DO_OPS(ap->a_head.a_ops, error, ap, vop_aclcheck);
1764 return(error);
0961aa92
MD
1765}
1766
1767int
1768vop_getextattr_ap(struct vop_getextattr_args *ap)
1769{
cbe54d63
MD
1770 int error;
1771
1772 DO_OPS(ap->a_head.a_ops, error, ap, vop_getextattr);
1773 return(error);
0961aa92
MD
1774}
1775
1776int
1777vop_setextattr_ap(struct vop_setextattr_args *ap)
1778{
cbe54d63
MD
1779 int error;
1780
1781 DO_OPS(ap->a_head.a_ops, error, ap, vop_setextattr);
1782 return(error);
0961aa92
MD
1783}
1784
cbe54d63 1785int
949ecb9b 1786vop_mountctl_ap(struct vop_mountctl_args *ap)
cbe54d63
MD
1787{
1788 int error;
1789
949ecb9b 1790 DO_OPS(ap->a_head.a_ops, error, ap, vop_mountctl);
cbe54d63 1791 return(error);
2d3e977e
MD
1792}
1793
fad57d0e
MD
1794int
1795vop_nresolve_ap(struct vop_nresolve_args *ap)
1796{
1797 int error;
1798
1799 DO_OPS(ap->a_head.a_ops, error, ap, vop_nresolve);
1800 return(error);
1801}
1802
1803int
1804vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args *ap)
1805{
1806 int error;
1807
1808 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlookupdotdot);
1809 return(error);
1810}
1811
1812int
1813vop_ncreate_ap(struct vop_ncreate_args *ap)
1814{
1815 int error;
1816
1817 DO_OPS(ap->a_head.a_ops, error, ap, vop_ncreate);
1818 return(error);
1819}
1820
1821int
1822vop_nmkdir_ap(struct vop_nmkdir_args *ap)
1823{
1824 int error;
1825
1826 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmkdir);
1827 return(error);
1828}
1829
1830int
1831vop_nmknod_ap(struct vop_nmknod_args *ap)
1832{
1833 int error;
1834
1835 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmknod);
1836 return(error);
1837}
1838
1839int
1840vop_nlink_ap(struct vop_nlink_args *ap)
1841{
1842 int error;
1843
1844 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlink);
1845 return(error);
1846}
1847
1848int
1849vop_nsymlink_ap(struct vop_nsymlink_args *ap)
1850{
1851 int error;
1852
1853 DO_OPS(ap->a_head.a_ops, error, ap, vop_nsymlink);
1854 return(error);
1855}
1856
1857int
1858vop_nwhiteout_ap(struct vop_nwhiteout_args *ap)
1859{
1860 int error;
1861
1862 DO_OPS(ap->a_head.a_ops, error, ap, vop_nwhiteout);
1863 return(error);
1864}
1865
1866int
1867vop_nremove_ap(struct vop_nremove_args *ap)
1868{
1869 int error;
1870
1871 DO_OPS(ap->a_head.a_ops, error, ap, vop_nremove);
1872 return(error);
1873}
1874
1875int
1876vop_nrmdir_ap(struct vop_nrmdir_args *ap)
1877{
1878 int error;
1879
1880 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrmdir);
1881 return(error);
1882}
1883
1884int
1885vop_nrename_ap(struct vop_nrename_args *ap)
1886{
1887 int error;
1888
1889 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrename);
1890 return(error);
1891}
1892