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