Home | History | Annotate | Line # | Download | only in rumpvfs
rumpvnode_if.c revision 1.2
      1 /*	$NetBSD: rumpvnode_if.c,v 1.2 2009/09/29 11:54:52 pooka Exp $	*/
      2 
      3 /*
      4  * Warning: DO NOT EDIT! This file is automatically generated!
      5  * (Modifications made here may easily be lost!)
      6  *
      7  * Created from the file:
      8  *	NetBSD: vnode_if.src,v 1.58 2008/11/15 19:08:12 pooka Exp
      9  * by the script:
     10  *	NetBSD: vnode_if.sh,v 1.52 2009/09/29 11:51:02 pooka Exp
     11  */
     12 
     13 /*
     14  * Copyright (c) 1992, 1993, 1994, 1995
     15  *	The Regents of the University of California.  All rights reserved.
     16  *
     17  * Redistribution and use in source and binary forms, with or without
     18  * modification, are permitted provided that the following conditions
     19  * are met:
     20  * 1. Redistributions of source code must retain the above copyright
     21  *    notice, this list of conditions and the following disclaimer.
     22  * 2. Redistributions in binary form must reproduce the above copyright
     23  *    notice, this list of conditions and the following disclaimer in the
     24  *    documentation and/or other materials provided with the distribution.
     25  * 3. Neither the name of the University nor the names of its contributors
     26  *    may be used to endorse or promote products derived from this software
     27  *    without specific prior written permission.
     28  *
     29  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     30  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     31  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     32  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     33  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     34  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     35  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     36  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     37  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     38  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     39  * SUCH DAMAGE.
     40  */
     41 
     42 #include <sys/cdefs.h>
     43 __KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.2 2009/09/29 11:54:52 pooka Exp $");
     44 
     45 #include <sys/param.h>
     46 #include <sys/mount.h>
     47 #include <sys/buf.h>
     48 #include <sys/vnode.h>
     49 #include <sys/lock.h>
     50 #include <rump/rumpvnode_if.h>
     51 
     52 const struct vnodeop_desc rump_vop_default_desc = {
     53 	0,
     54 	"default",
     55 	0,
     56 	NULL,
     57 	VDESC_NO_OFFSET,
     58 	VDESC_NO_OFFSET,
     59 	VDESC_NO_OFFSET,
     60 	NULL,
     61 };
     62 
     63 
     64 /* Special cases: */
     65 
     66 const int rump_vop_bwrite_vp_offsets[] = {
     67 	VDESC_NO_OFFSET
     68 };
     69 const struct vnodeop_desc rump_vop_bwrite_desc = {
     70 	RUMP_VOP_BWRITE_DESCOFFSET,
     71 	"rump_vop_bwrite",
     72 	0,
     73 	rump_vop_bwrite_vp_offsets,
     74 	VDESC_NO_OFFSET,
     75 	VDESC_NO_OFFSET,
     76 	VDESC_NO_OFFSET,
     77 	NULL,
     78 };
     79 int
     80 RUMP_VOP_BWRITE(struct buf *bp)
     81 {
     82 	int error;
     83 	bool mpsafe;
     84 	struct rump_vop_bwrite_args a;
     85 	a.a_desc = VDESC(rump_vop_bwrite);
     86 	a.a_bp = bp;
     87 	mpsafe = (bp->b_vp->v_vflag & VV_MPSAFE);
     88 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
     89 	error = (VCALL(bp->b_vp, VOFFSET(rump_vop_bwrite), &a));
     90 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
     91 	return error;
     92 }
     93 
     94 /* End of special cases */
     95 
     96 const int rump_vop_lookup_vp_offsets[] = {
     97 	VOPARG_OFFSETOF(struct rump_vop_lookup_args,a_dvp),
     98 	VDESC_NO_OFFSET
     99 };
    100 const struct vnodeop_desc rump_vop_lookup_desc = {
    101 	RUMP_VOP_LOOKUP_DESCOFFSET,
    102 	"rump_vop_lookup",
    103 	0,
    104 	rump_vop_lookup_vp_offsets,
    105 	VOPARG_OFFSETOF(struct rump_vop_lookup_args, a_vpp),
    106 	VDESC_NO_OFFSET,
    107 	VOPARG_OFFSETOF(struct rump_vop_lookup_args, a_cnp),
    108 	NULL,
    109 };
    110 int
    111 RUMP_VOP_LOOKUP(struct vnode *dvp,
    112     struct vnode **vpp,
    113     struct componentname *cnp)
    114 {
    115 	int error;
    116 	bool mpsafe;
    117 	struct rump_vop_lookup_args a;
    118 	a.a_desc = VDESC(rump_vop_lookup);
    119 	a.a_dvp = dvp;
    120 	a.a_vpp = vpp;
    121 	a.a_cnp = cnp;
    122 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
    123 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    124 	error = (VCALL(dvp, VOFFSET(rump_vop_lookup), &a));
    125 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    126 #ifdef DIAGNOSTIC
    127 	if (error == 0)
    128 		KASSERT((*vpp)->v_size != VSIZENOTSET
    129 		    && (*vpp)->v_writesize != VSIZENOTSET);
    130 #endif /* DIAGNOSTIC */
    131 	return error;
    132 }
    133 
    134 const int rump_vop_create_vp_offsets[] = {
    135 	VOPARG_OFFSETOF(struct rump_vop_create_args,a_dvp),
    136 	VDESC_NO_OFFSET
    137 };
    138 const struct vnodeop_desc rump_vop_create_desc = {
    139 	RUMP_VOP_CREATE_DESCOFFSET,
    140 	"rump_vop_create",
    141 	0 | VDESC_VP0_WILLPUT,
    142 	rump_vop_create_vp_offsets,
    143 	VOPARG_OFFSETOF(struct rump_vop_create_args, a_vpp),
    144 	VDESC_NO_OFFSET,
    145 	VOPARG_OFFSETOF(struct rump_vop_create_args, a_cnp),
    146 	NULL,
    147 };
    148 int
    149 RUMP_VOP_CREATE(struct vnode *dvp,
    150     struct vnode **vpp,
    151     struct componentname *cnp,
    152     struct vattr *vap)
    153 {
    154 	int error;
    155 	bool mpsafe;
    156 	struct rump_vop_create_args a;
    157 	a.a_desc = VDESC(rump_vop_create);
    158 	a.a_dvp = dvp;
    159 	a.a_vpp = vpp;
    160 	a.a_cnp = cnp;
    161 	a.a_vap = vap;
    162 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
    163 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    164 	error = (VCALL(dvp, VOFFSET(rump_vop_create), &a));
    165 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    166 #ifdef DIAGNOSTIC
    167 	if (error == 0)
    168 		KASSERT((*vpp)->v_size != VSIZENOTSET
    169 		    && (*vpp)->v_writesize != VSIZENOTSET);
    170 #endif /* DIAGNOSTIC */
    171 	return error;
    172 }
    173 
    174 const int rump_vop_mknod_vp_offsets[] = {
    175 	VOPARG_OFFSETOF(struct rump_vop_mknod_args,a_dvp),
    176 	VDESC_NO_OFFSET
    177 };
    178 const struct vnodeop_desc rump_vop_mknod_desc = {
    179 	RUMP_VOP_MKNOD_DESCOFFSET,
    180 	"rump_vop_mknod",
    181 	0 | VDESC_VP0_WILLPUT,
    182 	rump_vop_mknod_vp_offsets,
    183 	VOPARG_OFFSETOF(struct rump_vop_mknod_args, a_vpp),
    184 	VDESC_NO_OFFSET,
    185 	VOPARG_OFFSETOF(struct rump_vop_mknod_args, a_cnp),
    186 	NULL,
    187 };
    188 int
    189 RUMP_VOP_MKNOD(struct vnode *dvp,
    190     struct vnode **vpp,
    191     struct componentname *cnp,
    192     struct vattr *vap)
    193 {
    194 	int error;
    195 	bool mpsafe;
    196 	struct rump_vop_mknod_args a;
    197 	a.a_desc = VDESC(rump_vop_mknod);
    198 	a.a_dvp = dvp;
    199 	a.a_vpp = vpp;
    200 	a.a_cnp = cnp;
    201 	a.a_vap = vap;
    202 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
    203 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    204 	error = (VCALL(dvp, VOFFSET(rump_vop_mknod), &a));
    205 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    206 #ifdef DIAGNOSTIC
    207 	if (error == 0)
    208 		KASSERT((*vpp)->v_size != VSIZENOTSET
    209 		    && (*vpp)->v_writesize != VSIZENOTSET);
    210 #endif /* DIAGNOSTIC */
    211 	return error;
    212 }
    213 
    214 const int rump_vop_open_vp_offsets[] = {
    215 	VOPARG_OFFSETOF(struct rump_vop_open_args,a_vp),
    216 	VDESC_NO_OFFSET
    217 };
    218 const struct vnodeop_desc rump_vop_open_desc = {
    219 	RUMP_VOP_OPEN_DESCOFFSET,
    220 	"rump_vop_open",
    221 	0,
    222 	rump_vop_open_vp_offsets,
    223 	VDESC_NO_OFFSET,
    224 	VOPARG_OFFSETOF(struct rump_vop_open_args, a_cred),
    225 	VDESC_NO_OFFSET,
    226 	NULL,
    227 };
    228 int
    229 RUMP_VOP_OPEN(struct vnode *vp,
    230     int mode,
    231     kauth_cred_t cred)
    232 {
    233 	int error;
    234 	bool mpsafe;
    235 	struct rump_vop_open_args a;
    236 	a.a_desc = VDESC(rump_vop_open);
    237 	a.a_vp = vp;
    238 	a.a_mode = mode;
    239 	a.a_cred = cred;
    240 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    241 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    242 	error = (VCALL(vp, VOFFSET(rump_vop_open), &a));
    243 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    244 	return error;
    245 }
    246 
    247 const int rump_vop_close_vp_offsets[] = {
    248 	VOPARG_OFFSETOF(struct rump_vop_close_args,a_vp),
    249 	VDESC_NO_OFFSET
    250 };
    251 const struct vnodeop_desc rump_vop_close_desc = {
    252 	RUMP_VOP_CLOSE_DESCOFFSET,
    253 	"rump_vop_close",
    254 	0,
    255 	rump_vop_close_vp_offsets,
    256 	VDESC_NO_OFFSET,
    257 	VOPARG_OFFSETOF(struct rump_vop_close_args, a_cred),
    258 	VDESC_NO_OFFSET,
    259 	NULL,
    260 };
    261 int
    262 RUMP_VOP_CLOSE(struct vnode *vp,
    263     int fflag,
    264     kauth_cred_t cred)
    265 {
    266 	int error;
    267 	bool mpsafe;
    268 	struct rump_vop_close_args a;
    269 	a.a_desc = VDESC(rump_vop_close);
    270 	a.a_vp = vp;
    271 	a.a_fflag = fflag;
    272 	a.a_cred = cred;
    273 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    274 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    275 	error = (VCALL(vp, VOFFSET(rump_vop_close), &a));
    276 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    277 	return error;
    278 }
    279 
    280 const int rump_vop_access_vp_offsets[] = {
    281 	VOPARG_OFFSETOF(struct rump_vop_access_args,a_vp),
    282 	VDESC_NO_OFFSET
    283 };
    284 const struct vnodeop_desc rump_vop_access_desc = {
    285 	RUMP_VOP_ACCESS_DESCOFFSET,
    286 	"rump_vop_access",
    287 	0,
    288 	rump_vop_access_vp_offsets,
    289 	VDESC_NO_OFFSET,
    290 	VOPARG_OFFSETOF(struct rump_vop_access_args, a_cred),
    291 	VDESC_NO_OFFSET,
    292 	NULL,
    293 };
    294 int
    295 RUMP_VOP_ACCESS(struct vnode *vp,
    296     int mode,
    297     kauth_cred_t cred)
    298 {
    299 	int error;
    300 	bool mpsafe;
    301 	struct rump_vop_access_args a;
    302 	a.a_desc = VDESC(rump_vop_access);
    303 	a.a_vp = vp;
    304 	a.a_mode = mode;
    305 	a.a_cred = cred;
    306 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    307 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    308 	error = (VCALL(vp, VOFFSET(rump_vop_access), &a));
    309 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    310 	return error;
    311 }
    312 
    313 const int rump_vop_getattr_vp_offsets[] = {
    314 	VOPARG_OFFSETOF(struct rump_vop_getattr_args,a_vp),
    315 	VDESC_NO_OFFSET
    316 };
    317 const struct vnodeop_desc rump_vop_getattr_desc = {
    318 	RUMP_VOP_GETATTR_DESCOFFSET,
    319 	"rump_vop_getattr",
    320 	0,
    321 	rump_vop_getattr_vp_offsets,
    322 	VDESC_NO_OFFSET,
    323 	VOPARG_OFFSETOF(struct rump_vop_getattr_args, a_cred),
    324 	VDESC_NO_OFFSET,
    325 	NULL,
    326 };
    327 int
    328 RUMP_VOP_GETATTR(struct vnode *vp,
    329     struct vattr *vap,
    330     kauth_cred_t cred)
    331 {
    332 	int error;
    333 	bool mpsafe;
    334 	struct rump_vop_getattr_args a;
    335 	a.a_desc = VDESC(rump_vop_getattr);
    336 	a.a_vp = vp;
    337 	a.a_vap = vap;
    338 	a.a_cred = cred;
    339 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    340 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    341 	error = (VCALL(vp, VOFFSET(rump_vop_getattr), &a));
    342 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    343 	return error;
    344 }
    345 
    346 const int rump_vop_setattr_vp_offsets[] = {
    347 	VOPARG_OFFSETOF(struct rump_vop_setattr_args,a_vp),
    348 	VDESC_NO_OFFSET
    349 };
    350 const struct vnodeop_desc rump_vop_setattr_desc = {
    351 	RUMP_VOP_SETATTR_DESCOFFSET,
    352 	"rump_vop_setattr",
    353 	0,
    354 	rump_vop_setattr_vp_offsets,
    355 	VDESC_NO_OFFSET,
    356 	VOPARG_OFFSETOF(struct rump_vop_setattr_args, a_cred),
    357 	VDESC_NO_OFFSET,
    358 	NULL,
    359 };
    360 int
    361 RUMP_VOP_SETATTR(struct vnode *vp,
    362     struct vattr *vap,
    363     kauth_cred_t cred)
    364 {
    365 	int error;
    366 	bool mpsafe;
    367 	struct rump_vop_setattr_args a;
    368 	a.a_desc = VDESC(rump_vop_setattr);
    369 	a.a_vp = vp;
    370 	a.a_vap = vap;
    371 	a.a_cred = cred;
    372 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    373 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    374 	error = (VCALL(vp, VOFFSET(rump_vop_setattr), &a));
    375 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    376 	return error;
    377 }
    378 
    379 const int rump_vop_read_vp_offsets[] = {
    380 	VOPARG_OFFSETOF(struct rump_vop_read_args,a_vp),
    381 	VDESC_NO_OFFSET
    382 };
    383 const struct vnodeop_desc rump_vop_read_desc = {
    384 	RUMP_VOP_READ_DESCOFFSET,
    385 	"rump_vop_read",
    386 	0,
    387 	rump_vop_read_vp_offsets,
    388 	VDESC_NO_OFFSET,
    389 	VOPARG_OFFSETOF(struct rump_vop_read_args, a_cred),
    390 	VDESC_NO_OFFSET,
    391 	NULL,
    392 };
    393 int
    394 RUMP_VOP_READ(struct vnode *vp,
    395     struct uio *uio,
    396     int ioflag,
    397     kauth_cred_t cred)
    398 {
    399 	int error;
    400 	bool mpsafe;
    401 	struct rump_vop_read_args a;
    402 	a.a_desc = VDESC(rump_vop_read);
    403 	a.a_vp = vp;
    404 	a.a_uio = uio;
    405 	a.a_ioflag = ioflag;
    406 	a.a_cred = cred;
    407 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    408 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    409 	error = (VCALL(vp, VOFFSET(rump_vop_read), &a));
    410 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    411 	return error;
    412 }
    413 
    414 const int rump_vop_write_vp_offsets[] = {
    415 	VOPARG_OFFSETOF(struct rump_vop_write_args,a_vp),
    416 	VDESC_NO_OFFSET
    417 };
    418 const struct vnodeop_desc rump_vop_write_desc = {
    419 	RUMP_VOP_WRITE_DESCOFFSET,
    420 	"rump_vop_write",
    421 	0,
    422 	rump_vop_write_vp_offsets,
    423 	VDESC_NO_OFFSET,
    424 	VOPARG_OFFSETOF(struct rump_vop_write_args, a_cred),
    425 	VDESC_NO_OFFSET,
    426 	NULL,
    427 };
    428 int
    429 RUMP_VOP_WRITE(struct vnode *vp,
    430     struct uio *uio,
    431     int ioflag,
    432     kauth_cred_t cred)
    433 {
    434 	int error;
    435 	bool mpsafe;
    436 	struct rump_vop_write_args a;
    437 	a.a_desc = VDESC(rump_vop_write);
    438 	a.a_vp = vp;
    439 	a.a_uio = uio;
    440 	a.a_ioflag = ioflag;
    441 	a.a_cred = cred;
    442 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    443 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    444 	error = (VCALL(vp, VOFFSET(rump_vop_write), &a));
    445 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    446 	return error;
    447 }
    448 
    449 const int rump_vop_ioctl_vp_offsets[] = {
    450 	VOPARG_OFFSETOF(struct rump_vop_ioctl_args,a_vp),
    451 	VDESC_NO_OFFSET
    452 };
    453 const struct vnodeop_desc rump_vop_ioctl_desc = {
    454 	RUMP_VOP_IOCTL_DESCOFFSET,
    455 	"rump_vop_ioctl",
    456 	0,
    457 	rump_vop_ioctl_vp_offsets,
    458 	VDESC_NO_OFFSET,
    459 	VOPARG_OFFSETOF(struct rump_vop_ioctl_args, a_cred),
    460 	VDESC_NO_OFFSET,
    461 	NULL,
    462 };
    463 int
    464 RUMP_VOP_IOCTL(struct vnode *vp,
    465     u_long command,
    466     void *data,
    467     int fflag,
    468     kauth_cred_t cred)
    469 {
    470 	int error;
    471 	bool mpsafe;
    472 	struct rump_vop_ioctl_args a;
    473 	a.a_desc = VDESC(rump_vop_ioctl);
    474 	a.a_vp = vp;
    475 	a.a_command = command;
    476 	a.a_data = data;
    477 	a.a_fflag = fflag;
    478 	a.a_cred = cred;
    479 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    480 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    481 	error = (VCALL(vp, VOFFSET(rump_vop_ioctl), &a));
    482 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    483 	return error;
    484 }
    485 
    486 const int rump_vop_fcntl_vp_offsets[] = {
    487 	VOPARG_OFFSETOF(struct rump_vop_fcntl_args,a_vp),
    488 	VDESC_NO_OFFSET
    489 };
    490 const struct vnodeop_desc rump_vop_fcntl_desc = {
    491 	RUMP_VOP_FCNTL_DESCOFFSET,
    492 	"rump_vop_fcntl",
    493 	0,
    494 	rump_vop_fcntl_vp_offsets,
    495 	VDESC_NO_OFFSET,
    496 	VOPARG_OFFSETOF(struct rump_vop_fcntl_args, a_cred),
    497 	VDESC_NO_OFFSET,
    498 	NULL,
    499 };
    500 int
    501 RUMP_VOP_FCNTL(struct vnode *vp,
    502     u_int command,
    503     void *data,
    504     int fflag,
    505     kauth_cred_t cred)
    506 {
    507 	int error;
    508 	bool mpsafe;
    509 	struct rump_vop_fcntl_args a;
    510 	a.a_desc = VDESC(rump_vop_fcntl);
    511 	a.a_vp = vp;
    512 	a.a_command = command;
    513 	a.a_data = data;
    514 	a.a_fflag = fflag;
    515 	a.a_cred = cred;
    516 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    517 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    518 	error = (VCALL(vp, VOFFSET(rump_vop_fcntl), &a));
    519 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    520 	return error;
    521 }
    522 
    523 const int rump_vop_poll_vp_offsets[] = {
    524 	VOPARG_OFFSETOF(struct rump_vop_poll_args,a_vp),
    525 	VDESC_NO_OFFSET
    526 };
    527 const struct vnodeop_desc rump_vop_poll_desc = {
    528 	RUMP_VOP_POLL_DESCOFFSET,
    529 	"rump_vop_poll",
    530 	0,
    531 	rump_vop_poll_vp_offsets,
    532 	VDESC_NO_OFFSET,
    533 	VDESC_NO_OFFSET,
    534 	VDESC_NO_OFFSET,
    535 	NULL,
    536 };
    537 int
    538 RUMP_VOP_POLL(struct vnode *vp,
    539     int events)
    540 {
    541 	int error;
    542 	bool mpsafe;
    543 	struct rump_vop_poll_args a;
    544 	a.a_desc = VDESC(rump_vop_poll);
    545 	a.a_vp = vp;
    546 	a.a_events = events;
    547 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    548 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    549 	error = (VCALL(vp, VOFFSET(rump_vop_poll), &a));
    550 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    551 	return error;
    552 }
    553 
    554 const int rump_vop_kqfilter_vp_offsets[] = {
    555 	VOPARG_OFFSETOF(struct rump_vop_kqfilter_args,a_vp),
    556 	VDESC_NO_OFFSET
    557 };
    558 const struct vnodeop_desc rump_vop_kqfilter_desc = {
    559 	RUMP_VOP_KQFILTER_DESCOFFSET,
    560 	"rump_vop_kqfilter",
    561 	0,
    562 	rump_vop_kqfilter_vp_offsets,
    563 	VDESC_NO_OFFSET,
    564 	VDESC_NO_OFFSET,
    565 	VDESC_NO_OFFSET,
    566 	NULL,
    567 };
    568 int
    569 RUMP_VOP_KQFILTER(struct vnode *vp,
    570     struct knote *kn)
    571 {
    572 	int error;
    573 	bool mpsafe;
    574 	struct rump_vop_kqfilter_args a;
    575 	a.a_desc = VDESC(rump_vop_kqfilter);
    576 	a.a_vp = vp;
    577 	a.a_kn = kn;
    578 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    579 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    580 	error = (VCALL(vp, VOFFSET(rump_vop_kqfilter), &a));
    581 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    582 	return error;
    583 }
    584 
    585 const int rump_vop_revoke_vp_offsets[] = {
    586 	VOPARG_OFFSETOF(struct rump_vop_revoke_args,a_vp),
    587 	VDESC_NO_OFFSET
    588 };
    589 const struct vnodeop_desc rump_vop_revoke_desc = {
    590 	RUMP_VOP_REVOKE_DESCOFFSET,
    591 	"rump_vop_revoke",
    592 	0,
    593 	rump_vop_revoke_vp_offsets,
    594 	VDESC_NO_OFFSET,
    595 	VDESC_NO_OFFSET,
    596 	VDESC_NO_OFFSET,
    597 	NULL,
    598 };
    599 int
    600 RUMP_VOP_REVOKE(struct vnode *vp,
    601     int flags)
    602 {
    603 	int error;
    604 	bool mpsafe;
    605 	struct rump_vop_revoke_args a;
    606 	a.a_desc = VDESC(rump_vop_revoke);
    607 	a.a_vp = vp;
    608 	a.a_flags = flags;
    609 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    610 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    611 	error = (VCALL(vp, VOFFSET(rump_vop_revoke), &a));
    612 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    613 	return error;
    614 }
    615 
    616 const int rump_vop_mmap_vp_offsets[] = {
    617 	VOPARG_OFFSETOF(struct rump_vop_mmap_args,a_vp),
    618 	VDESC_NO_OFFSET
    619 };
    620 const struct vnodeop_desc rump_vop_mmap_desc = {
    621 	RUMP_VOP_MMAP_DESCOFFSET,
    622 	"rump_vop_mmap",
    623 	0,
    624 	rump_vop_mmap_vp_offsets,
    625 	VDESC_NO_OFFSET,
    626 	VOPARG_OFFSETOF(struct rump_vop_mmap_args, a_cred),
    627 	VDESC_NO_OFFSET,
    628 	NULL,
    629 };
    630 int
    631 RUMP_VOP_MMAP(struct vnode *vp,
    632     int prot,
    633     kauth_cred_t cred)
    634 {
    635 	int error;
    636 	bool mpsafe;
    637 	struct rump_vop_mmap_args a;
    638 	a.a_desc = VDESC(rump_vop_mmap);
    639 	a.a_vp = vp;
    640 	a.a_prot = prot;
    641 	a.a_cred = cred;
    642 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    643 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    644 	error = (VCALL(vp, VOFFSET(rump_vop_mmap), &a));
    645 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    646 	return error;
    647 }
    648 
    649 const int rump_vop_fsync_vp_offsets[] = {
    650 	VOPARG_OFFSETOF(struct rump_vop_fsync_args,a_vp),
    651 	VDESC_NO_OFFSET
    652 };
    653 const struct vnodeop_desc rump_vop_fsync_desc = {
    654 	RUMP_VOP_FSYNC_DESCOFFSET,
    655 	"rump_vop_fsync",
    656 	0,
    657 	rump_vop_fsync_vp_offsets,
    658 	VDESC_NO_OFFSET,
    659 	VOPARG_OFFSETOF(struct rump_vop_fsync_args, a_cred),
    660 	VDESC_NO_OFFSET,
    661 	NULL,
    662 };
    663 int
    664 RUMP_VOP_FSYNC(struct vnode *vp,
    665     kauth_cred_t cred,
    666     int flags,
    667     off_t offlo,
    668     off_t offhi)
    669 {
    670 	int error;
    671 	bool mpsafe;
    672 	struct rump_vop_fsync_args a;
    673 	a.a_desc = VDESC(rump_vop_fsync);
    674 	a.a_vp = vp;
    675 	a.a_cred = cred;
    676 	a.a_flags = flags;
    677 	a.a_offlo = offlo;
    678 	a.a_offhi = offhi;
    679 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    680 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    681 	error = (VCALL(vp, VOFFSET(rump_vop_fsync), &a));
    682 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    683 	return error;
    684 }
    685 
    686 const int rump_vop_seek_vp_offsets[] = {
    687 	VOPARG_OFFSETOF(struct rump_vop_seek_args,a_vp),
    688 	VDESC_NO_OFFSET
    689 };
    690 const struct vnodeop_desc rump_vop_seek_desc = {
    691 	RUMP_VOP_SEEK_DESCOFFSET,
    692 	"rump_vop_seek",
    693 	0,
    694 	rump_vop_seek_vp_offsets,
    695 	VDESC_NO_OFFSET,
    696 	VOPARG_OFFSETOF(struct rump_vop_seek_args, a_cred),
    697 	VDESC_NO_OFFSET,
    698 	NULL,
    699 };
    700 int
    701 RUMP_VOP_SEEK(struct vnode *vp,
    702     off_t oldoff,
    703     off_t newoff,
    704     kauth_cred_t cred)
    705 {
    706 	int error;
    707 	bool mpsafe;
    708 	struct rump_vop_seek_args a;
    709 	a.a_desc = VDESC(rump_vop_seek);
    710 	a.a_vp = vp;
    711 	a.a_oldoff = oldoff;
    712 	a.a_newoff = newoff;
    713 	a.a_cred = cred;
    714 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    715 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    716 	error = (VCALL(vp, VOFFSET(rump_vop_seek), &a));
    717 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    718 	return error;
    719 }
    720 
    721 const int rump_vop_remove_vp_offsets[] = {
    722 	VOPARG_OFFSETOF(struct rump_vop_remove_args,a_dvp),
    723 	VOPARG_OFFSETOF(struct rump_vop_remove_args,a_vp),
    724 	VDESC_NO_OFFSET
    725 };
    726 const struct vnodeop_desc rump_vop_remove_desc = {
    727 	RUMP_VOP_REMOVE_DESCOFFSET,
    728 	"rump_vop_remove",
    729 	0 | VDESC_VP0_WILLPUT | VDESC_VP1_WILLPUT,
    730 	rump_vop_remove_vp_offsets,
    731 	VDESC_NO_OFFSET,
    732 	VDESC_NO_OFFSET,
    733 	VOPARG_OFFSETOF(struct rump_vop_remove_args, a_cnp),
    734 	NULL,
    735 };
    736 int
    737 RUMP_VOP_REMOVE(struct vnode *dvp,
    738     struct vnode *vp,
    739     struct componentname *cnp)
    740 {
    741 	int error;
    742 	bool mpsafe;
    743 	struct rump_vop_remove_args a;
    744 	a.a_desc = VDESC(rump_vop_remove);
    745 	a.a_dvp = dvp;
    746 	a.a_vp = vp;
    747 	a.a_cnp = cnp;
    748 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
    749 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    750 	error = (VCALL(dvp, VOFFSET(rump_vop_remove), &a));
    751 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    752 	return error;
    753 }
    754 
    755 const int rump_vop_link_vp_offsets[] = {
    756 	VOPARG_OFFSETOF(struct rump_vop_link_args,a_dvp),
    757 	VOPARG_OFFSETOF(struct rump_vop_link_args,a_vp),
    758 	VDESC_NO_OFFSET
    759 };
    760 const struct vnodeop_desc rump_vop_link_desc = {
    761 	RUMP_VOP_LINK_DESCOFFSET,
    762 	"rump_vop_link",
    763 	0 | VDESC_VP0_WILLPUT,
    764 	rump_vop_link_vp_offsets,
    765 	VDESC_NO_OFFSET,
    766 	VDESC_NO_OFFSET,
    767 	VOPARG_OFFSETOF(struct rump_vop_link_args, a_cnp),
    768 	NULL,
    769 };
    770 int
    771 RUMP_VOP_LINK(struct vnode *dvp,
    772     struct vnode *vp,
    773     struct componentname *cnp)
    774 {
    775 	int error;
    776 	bool mpsafe;
    777 	struct rump_vop_link_args a;
    778 	a.a_desc = VDESC(rump_vop_link);
    779 	a.a_dvp = dvp;
    780 	a.a_vp = vp;
    781 	a.a_cnp = cnp;
    782 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
    783 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    784 	error = (VCALL(dvp, VOFFSET(rump_vop_link), &a));
    785 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    786 	return error;
    787 }
    788 
    789 const int rump_vop_rename_vp_offsets[] = {
    790 	VOPARG_OFFSETOF(struct rump_vop_rename_args,a_fdvp),
    791 	VOPARG_OFFSETOF(struct rump_vop_rename_args,a_fvp),
    792 	VOPARG_OFFSETOF(struct rump_vop_rename_args,a_tdvp),
    793 	VOPARG_OFFSETOF(struct rump_vop_rename_args,a_tvp),
    794 	VDESC_NO_OFFSET
    795 };
    796 const struct vnodeop_desc rump_vop_rename_desc = {
    797 	RUMP_VOP_RENAME_DESCOFFSET,
    798 	"rump_vop_rename",
    799 	0 | VDESC_VP0_WILLRELE | VDESC_VP1_WILLRELE | VDESC_VP2_WILLPUT | VDESC_VP3_WILLPUT,
    800 	rump_vop_rename_vp_offsets,
    801 	VDESC_NO_OFFSET,
    802 	VDESC_NO_OFFSET,
    803 	VOPARG_OFFSETOF(struct rump_vop_rename_args, a_fcnp),
    804 	NULL,
    805 };
    806 int
    807 RUMP_VOP_RENAME(struct vnode *fdvp,
    808     struct vnode *fvp,
    809     struct componentname *fcnp,
    810     struct vnode *tdvp,
    811     struct vnode *tvp,
    812     struct componentname *tcnp)
    813 {
    814 	int error;
    815 	bool mpsafe;
    816 	struct rump_vop_rename_args a;
    817 	a.a_desc = VDESC(rump_vop_rename);
    818 	a.a_fdvp = fdvp;
    819 	a.a_fvp = fvp;
    820 	a.a_fcnp = fcnp;
    821 	a.a_tdvp = tdvp;
    822 	a.a_tvp = tvp;
    823 	a.a_tcnp = tcnp;
    824 	mpsafe = (fdvp->v_vflag & VV_MPSAFE);
    825 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    826 	error = (VCALL(fdvp, VOFFSET(rump_vop_rename), &a));
    827 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    828 	return error;
    829 }
    830 
    831 const int rump_vop_mkdir_vp_offsets[] = {
    832 	VOPARG_OFFSETOF(struct rump_vop_mkdir_args,a_dvp),
    833 	VDESC_NO_OFFSET
    834 };
    835 const struct vnodeop_desc rump_vop_mkdir_desc = {
    836 	RUMP_VOP_MKDIR_DESCOFFSET,
    837 	"rump_vop_mkdir",
    838 	0 | VDESC_VP0_WILLPUT,
    839 	rump_vop_mkdir_vp_offsets,
    840 	VOPARG_OFFSETOF(struct rump_vop_mkdir_args, a_vpp),
    841 	VDESC_NO_OFFSET,
    842 	VOPARG_OFFSETOF(struct rump_vop_mkdir_args, a_cnp),
    843 	NULL,
    844 };
    845 int
    846 RUMP_VOP_MKDIR(struct vnode *dvp,
    847     struct vnode **vpp,
    848     struct componentname *cnp,
    849     struct vattr *vap)
    850 {
    851 	int error;
    852 	bool mpsafe;
    853 	struct rump_vop_mkdir_args a;
    854 	a.a_desc = VDESC(rump_vop_mkdir);
    855 	a.a_dvp = dvp;
    856 	a.a_vpp = vpp;
    857 	a.a_cnp = cnp;
    858 	a.a_vap = vap;
    859 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
    860 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    861 	error = (VCALL(dvp, VOFFSET(rump_vop_mkdir), &a));
    862 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    863 #ifdef DIAGNOSTIC
    864 	if (error == 0)
    865 		KASSERT((*vpp)->v_size != VSIZENOTSET
    866 		    && (*vpp)->v_writesize != VSIZENOTSET);
    867 #endif /* DIAGNOSTIC */
    868 	return error;
    869 }
    870 
    871 const int rump_vop_rmdir_vp_offsets[] = {
    872 	VOPARG_OFFSETOF(struct rump_vop_rmdir_args,a_dvp),
    873 	VOPARG_OFFSETOF(struct rump_vop_rmdir_args,a_vp),
    874 	VDESC_NO_OFFSET
    875 };
    876 const struct vnodeop_desc rump_vop_rmdir_desc = {
    877 	RUMP_VOP_RMDIR_DESCOFFSET,
    878 	"rump_vop_rmdir",
    879 	0 | VDESC_VP0_WILLPUT | VDESC_VP1_WILLPUT,
    880 	rump_vop_rmdir_vp_offsets,
    881 	VDESC_NO_OFFSET,
    882 	VDESC_NO_OFFSET,
    883 	VOPARG_OFFSETOF(struct rump_vop_rmdir_args, a_cnp),
    884 	NULL,
    885 };
    886 int
    887 RUMP_VOP_RMDIR(struct vnode *dvp,
    888     struct vnode *vp,
    889     struct componentname *cnp)
    890 {
    891 	int error;
    892 	bool mpsafe;
    893 	struct rump_vop_rmdir_args a;
    894 	a.a_desc = VDESC(rump_vop_rmdir);
    895 	a.a_dvp = dvp;
    896 	a.a_vp = vp;
    897 	a.a_cnp = cnp;
    898 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
    899 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    900 	error = (VCALL(dvp, VOFFSET(rump_vop_rmdir), &a));
    901 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    902 	return error;
    903 }
    904 
    905 const int rump_vop_symlink_vp_offsets[] = {
    906 	VOPARG_OFFSETOF(struct rump_vop_symlink_args,a_dvp),
    907 	VDESC_NO_OFFSET
    908 };
    909 const struct vnodeop_desc rump_vop_symlink_desc = {
    910 	RUMP_VOP_SYMLINK_DESCOFFSET,
    911 	"rump_vop_symlink",
    912 	0 | VDESC_VP0_WILLPUT,
    913 	rump_vop_symlink_vp_offsets,
    914 	VOPARG_OFFSETOF(struct rump_vop_symlink_args, a_vpp),
    915 	VDESC_NO_OFFSET,
    916 	VOPARG_OFFSETOF(struct rump_vop_symlink_args, a_cnp),
    917 	NULL,
    918 };
    919 int
    920 RUMP_VOP_SYMLINK(struct vnode *dvp,
    921     struct vnode **vpp,
    922     struct componentname *cnp,
    923     struct vattr *vap,
    924     char *target)
    925 {
    926 	int error;
    927 	bool mpsafe;
    928 	struct rump_vop_symlink_args a;
    929 	a.a_desc = VDESC(rump_vop_symlink);
    930 	a.a_dvp = dvp;
    931 	a.a_vpp = vpp;
    932 	a.a_cnp = cnp;
    933 	a.a_vap = vap;
    934 	a.a_target = target;
    935 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
    936 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    937 	error = (VCALL(dvp, VOFFSET(rump_vop_symlink), &a));
    938 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    939 #ifdef DIAGNOSTIC
    940 	if (error == 0)
    941 		KASSERT((*vpp)->v_size != VSIZENOTSET
    942 		    && (*vpp)->v_writesize != VSIZENOTSET);
    943 #endif /* DIAGNOSTIC */
    944 	return error;
    945 }
    946 
    947 const int rump_vop_readdir_vp_offsets[] = {
    948 	VOPARG_OFFSETOF(struct rump_vop_readdir_args,a_vp),
    949 	VDESC_NO_OFFSET
    950 };
    951 const struct vnodeop_desc rump_vop_readdir_desc = {
    952 	RUMP_VOP_READDIR_DESCOFFSET,
    953 	"rump_vop_readdir",
    954 	0,
    955 	rump_vop_readdir_vp_offsets,
    956 	VDESC_NO_OFFSET,
    957 	VOPARG_OFFSETOF(struct rump_vop_readdir_args, a_cred),
    958 	VDESC_NO_OFFSET,
    959 	NULL,
    960 };
    961 int
    962 RUMP_VOP_READDIR(struct vnode *vp,
    963     struct uio *uio,
    964     kauth_cred_t cred,
    965     int *eofflag,
    966     off_t **cookies,
    967     int *ncookies)
    968 {
    969 	int error;
    970 	bool mpsafe;
    971 	struct rump_vop_readdir_args a;
    972 	a.a_desc = VDESC(rump_vop_readdir);
    973 	a.a_vp = vp;
    974 	a.a_uio = uio;
    975 	a.a_cred = cred;
    976 	a.a_eofflag = eofflag;
    977 	a.a_cookies = cookies;
    978 	a.a_ncookies = ncookies;
    979 	mpsafe = (vp->v_vflag & VV_MPSAFE);
    980 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
    981 	error = (VCALL(vp, VOFFSET(rump_vop_readdir), &a));
    982 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
    983 	return error;
    984 }
    985 
    986 const int rump_vop_readlink_vp_offsets[] = {
    987 	VOPARG_OFFSETOF(struct rump_vop_readlink_args,a_vp),
    988 	VDESC_NO_OFFSET
    989 };
    990 const struct vnodeop_desc rump_vop_readlink_desc = {
    991 	RUMP_VOP_READLINK_DESCOFFSET,
    992 	"rump_vop_readlink",
    993 	0,
    994 	rump_vop_readlink_vp_offsets,
    995 	VDESC_NO_OFFSET,
    996 	VOPARG_OFFSETOF(struct rump_vop_readlink_args, a_cred),
    997 	VDESC_NO_OFFSET,
    998 	NULL,
    999 };
   1000 int
   1001 RUMP_VOP_READLINK(struct vnode *vp,
   1002     struct uio *uio,
   1003     kauth_cred_t cred)
   1004 {
   1005 	int error;
   1006 	bool mpsafe;
   1007 	struct rump_vop_readlink_args a;
   1008 	a.a_desc = VDESC(rump_vop_readlink);
   1009 	a.a_vp = vp;
   1010 	a.a_uio = uio;
   1011 	a.a_cred = cred;
   1012 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1013 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1014 	error = (VCALL(vp, VOFFSET(rump_vop_readlink), &a));
   1015 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1016 	return error;
   1017 }
   1018 
   1019 const int rump_vop_abortop_vp_offsets[] = {
   1020 	VOPARG_OFFSETOF(struct rump_vop_abortop_args,a_dvp),
   1021 	VDESC_NO_OFFSET
   1022 };
   1023 const struct vnodeop_desc rump_vop_abortop_desc = {
   1024 	RUMP_VOP_ABORTOP_DESCOFFSET,
   1025 	"rump_vop_abortop",
   1026 	0,
   1027 	rump_vop_abortop_vp_offsets,
   1028 	VDESC_NO_OFFSET,
   1029 	VDESC_NO_OFFSET,
   1030 	VOPARG_OFFSETOF(struct rump_vop_abortop_args, a_cnp),
   1031 	NULL,
   1032 };
   1033 int
   1034 RUMP_VOP_ABORTOP(struct vnode *dvp,
   1035     struct componentname *cnp)
   1036 {
   1037 	int error;
   1038 	bool mpsafe;
   1039 	struct rump_vop_abortop_args a;
   1040 	a.a_desc = VDESC(rump_vop_abortop);
   1041 	a.a_dvp = dvp;
   1042 	a.a_cnp = cnp;
   1043 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
   1044 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1045 	error = (VCALL(dvp, VOFFSET(rump_vop_abortop), &a));
   1046 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1047 	return error;
   1048 }
   1049 
   1050 const int rump_vop_inactive_vp_offsets[] = {
   1051 	VOPARG_OFFSETOF(struct rump_vop_inactive_args,a_vp),
   1052 	VDESC_NO_OFFSET
   1053 };
   1054 const struct vnodeop_desc rump_vop_inactive_desc = {
   1055 	RUMP_VOP_INACTIVE_DESCOFFSET,
   1056 	"rump_vop_inactive",
   1057 	0 | VDESC_VP0_WILLUNLOCK,
   1058 	rump_vop_inactive_vp_offsets,
   1059 	VDESC_NO_OFFSET,
   1060 	VDESC_NO_OFFSET,
   1061 	VDESC_NO_OFFSET,
   1062 	NULL,
   1063 };
   1064 int
   1065 RUMP_VOP_INACTIVE(struct vnode *vp,
   1066     bool *recycle)
   1067 {
   1068 	int error;
   1069 	bool mpsafe;
   1070 	struct rump_vop_inactive_args a;
   1071 	a.a_desc = VDESC(rump_vop_inactive);
   1072 	a.a_vp = vp;
   1073 	a.a_recycle = recycle;
   1074 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1075 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1076 	error = (VCALL(vp, VOFFSET(rump_vop_inactive), &a));
   1077 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1078 	return error;
   1079 }
   1080 
   1081 const int rump_vop_reclaim_vp_offsets[] = {
   1082 	VOPARG_OFFSETOF(struct rump_vop_reclaim_args,a_vp),
   1083 	VDESC_NO_OFFSET
   1084 };
   1085 const struct vnodeop_desc rump_vop_reclaim_desc = {
   1086 	RUMP_VOP_RECLAIM_DESCOFFSET,
   1087 	"rump_vop_reclaim",
   1088 	0,
   1089 	rump_vop_reclaim_vp_offsets,
   1090 	VDESC_NO_OFFSET,
   1091 	VDESC_NO_OFFSET,
   1092 	VDESC_NO_OFFSET,
   1093 	NULL,
   1094 };
   1095 int
   1096 RUMP_VOP_RECLAIM(struct vnode *vp)
   1097 {
   1098 	int error;
   1099 	bool mpsafe;
   1100 	struct rump_vop_reclaim_args a;
   1101 	a.a_desc = VDESC(rump_vop_reclaim);
   1102 	a.a_vp = vp;
   1103 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1104 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1105 	error = (VCALL(vp, VOFFSET(rump_vop_reclaim), &a));
   1106 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1107 	return error;
   1108 }
   1109 
   1110 const int rump_vop_lock_vp_offsets[] = {
   1111 	VOPARG_OFFSETOF(struct rump_vop_lock_args,a_vp),
   1112 	VDESC_NO_OFFSET
   1113 };
   1114 const struct vnodeop_desc rump_vop_lock_desc = {
   1115 	RUMP_VOP_LOCK_DESCOFFSET,
   1116 	"rump_vop_lock",
   1117 	0,
   1118 	rump_vop_lock_vp_offsets,
   1119 	VDESC_NO_OFFSET,
   1120 	VDESC_NO_OFFSET,
   1121 	VDESC_NO_OFFSET,
   1122 	NULL,
   1123 };
   1124 int
   1125 RUMP_VOP_LOCK(struct vnode *vp,
   1126     int flags)
   1127 {
   1128 	int error;
   1129 	bool mpsafe;
   1130 	struct rump_vop_lock_args a;
   1131 	a.a_desc = VDESC(rump_vop_lock);
   1132 	a.a_vp = vp;
   1133 	a.a_flags = flags;
   1134 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1135 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1136 	error = (VCALL(vp, VOFFSET(rump_vop_lock), &a));
   1137 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1138 	return error;
   1139 }
   1140 
   1141 const int rump_vop_unlock_vp_offsets[] = {
   1142 	VOPARG_OFFSETOF(struct rump_vop_unlock_args,a_vp),
   1143 	VDESC_NO_OFFSET
   1144 };
   1145 const struct vnodeop_desc rump_vop_unlock_desc = {
   1146 	RUMP_VOP_UNLOCK_DESCOFFSET,
   1147 	"rump_vop_unlock",
   1148 	0,
   1149 	rump_vop_unlock_vp_offsets,
   1150 	VDESC_NO_OFFSET,
   1151 	VDESC_NO_OFFSET,
   1152 	VDESC_NO_OFFSET,
   1153 	NULL,
   1154 };
   1155 int
   1156 RUMP_VOP_UNLOCK(struct vnode *vp,
   1157     int flags)
   1158 {
   1159 	int error;
   1160 	bool mpsafe;
   1161 	struct rump_vop_unlock_args a;
   1162 	a.a_desc = VDESC(rump_vop_unlock);
   1163 	a.a_vp = vp;
   1164 	a.a_flags = flags;
   1165 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1166 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1167 	error = (VCALL(vp, VOFFSET(rump_vop_unlock), &a));
   1168 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1169 	return error;
   1170 }
   1171 
   1172 const int rump_vop_bmap_vp_offsets[] = {
   1173 	VOPARG_OFFSETOF(struct rump_vop_bmap_args,a_vp),
   1174 	VDESC_NO_OFFSET
   1175 };
   1176 const struct vnodeop_desc rump_vop_bmap_desc = {
   1177 	RUMP_VOP_BMAP_DESCOFFSET,
   1178 	"rump_vop_bmap",
   1179 	0,
   1180 	rump_vop_bmap_vp_offsets,
   1181 	VOPARG_OFFSETOF(struct rump_vop_bmap_args, a_vpp),
   1182 	VDESC_NO_OFFSET,
   1183 	VDESC_NO_OFFSET,
   1184 	NULL,
   1185 };
   1186 int
   1187 RUMP_VOP_BMAP(struct vnode *vp,
   1188     daddr_t bn,
   1189     struct vnode **vpp,
   1190     daddr_t *bnp,
   1191     int *runp)
   1192 {
   1193 	int error;
   1194 	bool mpsafe;
   1195 	struct rump_vop_bmap_args a;
   1196 	a.a_desc = VDESC(rump_vop_bmap);
   1197 	a.a_vp = vp;
   1198 	a.a_bn = bn;
   1199 	a.a_vpp = vpp;
   1200 	a.a_bnp = bnp;
   1201 	a.a_runp = runp;
   1202 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1203 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1204 	error = (VCALL(vp, VOFFSET(rump_vop_bmap), &a));
   1205 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1206 	return error;
   1207 }
   1208 
   1209 const int rump_vop_strategy_vp_offsets[] = {
   1210 	VOPARG_OFFSETOF(struct rump_vop_strategy_args,a_vp),
   1211 	VDESC_NO_OFFSET
   1212 };
   1213 const struct vnodeop_desc rump_vop_strategy_desc = {
   1214 	RUMP_VOP_STRATEGY_DESCOFFSET,
   1215 	"rump_vop_strategy",
   1216 	0,
   1217 	rump_vop_strategy_vp_offsets,
   1218 	VDESC_NO_OFFSET,
   1219 	VDESC_NO_OFFSET,
   1220 	VDESC_NO_OFFSET,
   1221 	NULL,
   1222 };
   1223 int
   1224 RUMP_VOP_STRATEGY(struct vnode *vp,
   1225     struct buf *bp)
   1226 {
   1227 	int error;
   1228 	bool mpsafe;
   1229 	struct rump_vop_strategy_args a;
   1230 	a.a_desc = VDESC(rump_vop_strategy);
   1231 	a.a_vp = vp;
   1232 	a.a_bp = bp;
   1233 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1234 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1235 	error = (VCALL(vp, VOFFSET(rump_vop_strategy), &a));
   1236 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1237 	return error;
   1238 }
   1239 
   1240 const int rump_vop_print_vp_offsets[] = {
   1241 	VOPARG_OFFSETOF(struct rump_vop_print_args,a_vp),
   1242 	VDESC_NO_OFFSET
   1243 };
   1244 const struct vnodeop_desc rump_vop_print_desc = {
   1245 	RUMP_VOP_PRINT_DESCOFFSET,
   1246 	"rump_vop_print",
   1247 	0,
   1248 	rump_vop_print_vp_offsets,
   1249 	VDESC_NO_OFFSET,
   1250 	VDESC_NO_OFFSET,
   1251 	VDESC_NO_OFFSET,
   1252 	NULL,
   1253 };
   1254 int
   1255 RUMP_VOP_PRINT(struct vnode *vp)
   1256 {
   1257 	int error;
   1258 	bool mpsafe;
   1259 	struct rump_vop_print_args a;
   1260 	a.a_desc = VDESC(rump_vop_print);
   1261 	a.a_vp = vp;
   1262 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1263 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1264 	error = (VCALL(vp, VOFFSET(rump_vop_print), &a));
   1265 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1266 	return error;
   1267 }
   1268 
   1269 const int rump_vop_islocked_vp_offsets[] = {
   1270 	VOPARG_OFFSETOF(struct rump_vop_islocked_args,a_vp),
   1271 	VDESC_NO_OFFSET
   1272 };
   1273 const struct vnodeop_desc rump_vop_islocked_desc = {
   1274 	RUMP_VOP_ISLOCKED_DESCOFFSET,
   1275 	"rump_vop_islocked",
   1276 	0,
   1277 	rump_vop_islocked_vp_offsets,
   1278 	VDESC_NO_OFFSET,
   1279 	VDESC_NO_OFFSET,
   1280 	VDESC_NO_OFFSET,
   1281 	NULL,
   1282 };
   1283 int
   1284 RUMP_VOP_ISLOCKED(struct vnode *vp)
   1285 {
   1286 	int error;
   1287 	bool mpsafe;
   1288 	struct rump_vop_islocked_args a;
   1289 	a.a_desc = VDESC(rump_vop_islocked);
   1290 	a.a_vp = vp;
   1291 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1292 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1293 	error = (VCALL(vp, VOFFSET(rump_vop_islocked), &a));
   1294 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1295 	return error;
   1296 }
   1297 
   1298 const int rump_vop_pathconf_vp_offsets[] = {
   1299 	VOPARG_OFFSETOF(struct rump_vop_pathconf_args,a_vp),
   1300 	VDESC_NO_OFFSET
   1301 };
   1302 const struct vnodeop_desc rump_vop_pathconf_desc = {
   1303 	RUMP_VOP_PATHCONF_DESCOFFSET,
   1304 	"rump_vop_pathconf",
   1305 	0,
   1306 	rump_vop_pathconf_vp_offsets,
   1307 	VDESC_NO_OFFSET,
   1308 	VDESC_NO_OFFSET,
   1309 	VDESC_NO_OFFSET,
   1310 	NULL,
   1311 };
   1312 int
   1313 RUMP_VOP_PATHCONF(struct vnode *vp,
   1314     int name,
   1315     register_t *retval)
   1316 {
   1317 	int error;
   1318 	bool mpsafe;
   1319 	struct rump_vop_pathconf_args a;
   1320 	a.a_desc = VDESC(rump_vop_pathconf);
   1321 	a.a_vp = vp;
   1322 	a.a_name = name;
   1323 	a.a_retval = retval;
   1324 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1325 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1326 	error = (VCALL(vp, VOFFSET(rump_vop_pathconf), &a));
   1327 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1328 	return error;
   1329 }
   1330 
   1331 const int rump_vop_advlock_vp_offsets[] = {
   1332 	VOPARG_OFFSETOF(struct rump_vop_advlock_args,a_vp),
   1333 	VDESC_NO_OFFSET
   1334 };
   1335 const struct vnodeop_desc rump_vop_advlock_desc = {
   1336 	RUMP_VOP_ADVLOCK_DESCOFFSET,
   1337 	"rump_vop_advlock",
   1338 	0,
   1339 	rump_vop_advlock_vp_offsets,
   1340 	VDESC_NO_OFFSET,
   1341 	VDESC_NO_OFFSET,
   1342 	VDESC_NO_OFFSET,
   1343 	NULL,
   1344 };
   1345 int
   1346 RUMP_VOP_ADVLOCK(struct vnode *vp,
   1347     void *id,
   1348     int op,
   1349     struct flock *fl,
   1350     int flags)
   1351 {
   1352 	int error;
   1353 	bool mpsafe;
   1354 	struct rump_vop_advlock_args a;
   1355 	a.a_desc = VDESC(rump_vop_advlock);
   1356 	a.a_vp = vp;
   1357 	a.a_id = id;
   1358 	a.a_op = op;
   1359 	a.a_fl = fl;
   1360 	a.a_flags = flags;
   1361 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1362 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1363 	error = (VCALL(vp, VOFFSET(rump_vop_advlock), &a));
   1364 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1365 	return error;
   1366 }
   1367 
   1368 const int rump_vop_whiteout_vp_offsets[] = {
   1369 	VOPARG_OFFSETOF(struct rump_vop_whiteout_args,a_dvp),
   1370 	VDESC_NO_OFFSET
   1371 };
   1372 const struct vnodeop_desc rump_vop_whiteout_desc = {
   1373 	RUMP_VOP_WHITEOUT_DESCOFFSET,
   1374 	"rump_vop_whiteout",
   1375 	0,
   1376 	rump_vop_whiteout_vp_offsets,
   1377 	VDESC_NO_OFFSET,
   1378 	VDESC_NO_OFFSET,
   1379 	VOPARG_OFFSETOF(struct rump_vop_whiteout_args, a_cnp),
   1380 	NULL,
   1381 };
   1382 int
   1383 RUMP_VOP_WHITEOUT(struct vnode *dvp,
   1384     struct componentname *cnp,
   1385     int flags)
   1386 {
   1387 	int error;
   1388 	bool mpsafe;
   1389 	struct rump_vop_whiteout_args a;
   1390 	a.a_desc = VDESC(rump_vop_whiteout);
   1391 	a.a_dvp = dvp;
   1392 	a.a_cnp = cnp;
   1393 	a.a_flags = flags;
   1394 	mpsafe = (dvp->v_vflag & VV_MPSAFE);
   1395 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1396 	error = (VCALL(dvp, VOFFSET(rump_vop_whiteout), &a));
   1397 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1398 	return error;
   1399 }
   1400 
   1401 const int rump_vop_getpages_vp_offsets[] = {
   1402 	VOPARG_OFFSETOF(struct rump_vop_getpages_args,a_vp),
   1403 	VDESC_NO_OFFSET
   1404 };
   1405 const struct vnodeop_desc rump_vop_getpages_desc = {
   1406 	RUMP_VOP_GETPAGES_DESCOFFSET,
   1407 	"rump_vop_getpages",
   1408 	0,
   1409 	rump_vop_getpages_vp_offsets,
   1410 	VDESC_NO_OFFSET,
   1411 	VDESC_NO_OFFSET,
   1412 	VDESC_NO_OFFSET,
   1413 	NULL,
   1414 };
   1415 int
   1416 RUMP_VOP_GETPAGES(struct vnode *vp,
   1417     off_t offset,
   1418     struct vm_page **m,
   1419     int *count,
   1420     int centeridx,
   1421     int access_type,
   1422     int advice,
   1423     int flags)
   1424 {
   1425 	int error;
   1426 	bool mpsafe;
   1427 	struct rump_vop_getpages_args a;
   1428 	a.a_desc = VDESC(rump_vop_getpages);
   1429 	a.a_vp = vp;
   1430 	a.a_offset = offset;
   1431 	a.a_m = m;
   1432 	a.a_count = count;
   1433 	a.a_centeridx = centeridx;
   1434 	a.a_access_type = access_type;
   1435 	a.a_advice = advice;
   1436 	a.a_flags = flags;
   1437 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1438 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1439 	error = (VCALL(vp, VOFFSET(rump_vop_getpages), &a));
   1440 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1441 	return error;
   1442 }
   1443 
   1444 const int rump_vop_putpages_vp_offsets[] = {
   1445 	VOPARG_OFFSETOF(struct rump_vop_putpages_args,a_vp),
   1446 	VDESC_NO_OFFSET
   1447 };
   1448 const struct vnodeop_desc rump_vop_putpages_desc = {
   1449 	RUMP_VOP_PUTPAGES_DESCOFFSET,
   1450 	"rump_vop_putpages",
   1451 	0,
   1452 	rump_vop_putpages_vp_offsets,
   1453 	VDESC_NO_OFFSET,
   1454 	VDESC_NO_OFFSET,
   1455 	VDESC_NO_OFFSET,
   1456 	NULL,
   1457 };
   1458 int
   1459 RUMP_VOP_PUTPAGES(struct vnode *vp,
   1460     off_t offlo,
   1461     off_t offhi,
   1462     int flags)
   1463 {
   1464 	int error;
   1465 	bool mpsafe;
   1466 	struct rump_vop_putpages_args a;
   1467 	a.a_desc = VDESC(rump_vop_putpages);
   1468 	a.a_vp = vp;
   1469 	a.a_offlo = offlo;
   1470 	a.a_offhi = offhi;
   1471 	a.a_flags = flags;
   1472 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1473 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1474 	error = (VCALL(vp, VOFFSET(rump_vop_putpages), &a));
   1475 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1476 	return error;
   1477 }
   1478 
   1479 const int rump_vop_closeextattr_vp_offsets[] = {
   1480 	VOPARG_OFFSETOF(struct rump_vop_closeextattr_args,a_vp),
   1481 	VDESC_NO_OFFSET
   1482 };
   1483 const struct vnodeop_desc rump_vop_closeextattr_desc = {
   1484 	RUMP_VOP_CLOSEEXTATTR_DESCOFFSET,
   1485 	"rump_vop_closeextattr",
   1486 	0,
   1487 	rump_vop_closeextattr_vp_offsets,
   1488 	VDESC_NO_OFFSET,
   1489 	VOPARG_OFFSETOF(struct rump_vop_closeextattr_args, a_cred),
   1490 	VDESC_NO_OFFSET,
   1491 	NULL,
   1492 };
   1493 int
   1494 RUMP_VOP_CLOSEEXTATTR(struct vnode *vp,
   1495     int commit,
   1496     kauth_cred_t cred)
   1497 {
   1498 	int error;
   1499 	bool mpsafe;
   1500 	struct rump_vop_closeextattr_args a;
   1501 	a.a_desc = VDESC(rump_vop_closeextattr);
   1502 	a.a_vp = vp;
   1503 	a.a_commit = commit;
   1504 	a.a_cred = cred;
   1505 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1506 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1507 	error = (VCALL(vp, VOFFSET(rump_vop_closeextattr), &a));
   1508 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1509 	return error;
   1510 }
   1511 
   1512 const int rump_vop_getextattr_vp_offsets[] = {
   1513 	VOPARG_OFFSETOF(struct rump_vop_getextattr_args,a_vp),
   1514 	VDESC_NO_OFFSET
   1515 };
   1516 const struct vnodeop_desc rump_vop_getextattr_desc = {
   1517 	RUMP_VOP_GETEXTATTR_DESCOFFSET,
   1518 	"rump_vop_getextattr",
   1519 	0,
   1520 	rump_vop_getextattr_vp_offsets,
   1521 	VDESC_NO_OFFSET,
   1522 	VOPARG_OFFSETOF(struct rump_vop_getextattr_args, a_cred),
   1523 	VDESC_NO_OFFSET,
   1524 	NULL,
   1525 };
   1526 int
   1527 RUMP_VOP_GETEXTATTR(struct vnode *vp,
   1528     int attrnamespace,
   1529     const char *name,
   1530     struct uio *uio,
   1531     size_t *size,
   1532     kauth_cred_t cred)
   1533 {
   1534 	int error;
   1535 	bool mpsafe;
   1536 	struct rump_vop_getextattr_args a;
   1537 	a.a_desc = VDESC(rump_vop_getextattr);
   1538 	a.a_vp = vp;
   1539 	a.a_attrnamespace = attrnamespace;
   1540 	a.a_name = name;
   1541 	a.a_uio = uio;
   1542 	a.a_size = size;
   1543 	a.a_cred = cred;
   1544 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1545 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1546 	error = (VCALL(vp, VOFFSET(rump_vop_getextattr), &a));
   1547 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1548 	return error;
   1549 }
   1550 
   1551 const int rump_vop_listextattr_vp_offsets[] = {
   1552 	VOPARG_OFFSETOF(struct rump_vop_listextattr_args,a_vp),
   1553 	VDESC_NO_OFFSET
   1554 };
   1555 const struct vnodeop_desc rump_vop_listextattr_desc = {
   1556 	RUMP_VOP_LISTEXTATTR_DESCOFFSET,
   1557 	"rump_vop_listextattr",
   1558 	0,
   1559 	rump_vop_listextattr_vp_offsets,
   1560 	VDESC_NO_OFFSET,
   1561 	VOPARG_OFFSETOF(struct rump_vop_listextattr_args, a_cred),
   1562 	VDESC_NO_OFFSET,
   1563 	NULL,
   1564 };
   1565 int
   1566 RUMP_VOP_LISTEXTATTR(struct vnode *vp,
   1567     int attrnamespace,
   1568     struct uio *uio,
   1569     size_t *size,
   1570     kauth_cred_t cred)
   1571 {
   1572 	int error;
   1573 	bool mpsafe;
   1574 	struct rump_vop_listextattr_args a;
   1575 	a.a_desc = VDESC(rump_vop_listextattr);
   1576 	a.a_vp = vp;
   1577 	a.a_attrnamespace = attrnamespace;
   1578 	a.a_uio = uio;
   1579 	a.a_size = size;
   1580 	a.a_cred = cred;
   1581 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1582 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1583 	error = (VCALL(vp, VOFFSET(rump_vop_listextattr), &a));
   1584 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1585 	return error;
   1586 }
   1587 
   1588 const int rump_vop_openextattr_vp_offsets[] = {
   1589 	VOPARG_OFFSETOF(struct rump_vop_openextattr_args,a_vp),
   1590 	VDESC_NO_OFFSET
   1591 };
   1592 const struct vnodeop_desc rump_vop_openextattr_desc = {
   1593 	RUMP_VOP_OPENEXTATTR_DESCOFFSET,
   1594 	"rump_vop_openextattr",
   1595 	0,
   1596 	rump_vop_openextattr_vp_offsets,
   1597 	VDESC_NO_OFFSET,
   1598 	VOPARG_OFFSETOF(struct rump_vop_openextattr_args, a_cred),
   1599 	VDESC_NO_OFFSET,
   1600 	NULL,
   1601 };
   1602 int
   1603 RUMP_VOP_OPENEXTATTR(struct vnode *vp,
   1604     kauth_cred_t cred)
   1605 {
   1606 	int error;
   1607 	bool mpsafe;
   1608 	struct rump_vop_openextattr_args a;
   1609 	a.a_desc = VDESC(rump_vop_openextattr);
   1610 	a.a_vp = vp;
   1611 	a.a_cred = cred;
   1612 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1613 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1614 	error = (VCALL(vp, VOFFSET(rump_vop_openextattr), &a));
   1615 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1616 	return error;
   1617 }
   1618 
   1619 const int rump_vop_deleteextattr_vp_offsets[] = {
   1620 	VOPARG_OFFSETOF(struct rump_vop_deleteextattr_args,a_vp),
   1621 	VDESC_NO_OFFSET
   1622 };
   1623 const struct vnodeop_desc rump_vop_deleteextattr_desc = {
   1624 	RUMP_VOP_DELETEEXTATTR_DESCOFFSET,
   1625 	"rump_vop_deleteextattr",
   1626 	0,
   1627 	rump_vop_deleteextattr_vp_offsets,
   1628 	VDESC_NO_OFFSET,
   1629 	VOPARG_OFFSETOF(struct rump_vop_deleteextattr_args, a_cred),
   1630 	VDESC_NO_OFFSET,
   1631 	NULL,
   1632 };
   1633 int
   1634 RUMP_VOP_DELETEEXTATTR(struct vnode *vp,
   1635     int attrnamespace,
   1636     const char *name,
   1637     kauth_cred_t cred)
   1638 {
   1639 	int error;
   1640 	bool mpsafe;
   1641 	struct rump_vop_deleteextattr_args a;
   1642 	a.a_desc = VDESC(rump_vop_deleteextattr);
   1643 	a.a_vp = vp;
   1644 	a.a_attrnamespace = attrnamespace;
   1645 	a.a_name = name;
   1646 	a.a_cred = cred;
   1647 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1648 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1649 	error = (VCALL(vp, VOFFSET(rump_vop_deleteextattr), &a));
   1650 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1651 	return error;
   1652 }
   1653 
   1654 const int rump_vop_setextattr_vp_offsets[] = {
   1655 	VOPARG_OFFSETOF(struct rump_vop_setextattr_args,a_vp),
   1656 	VDESC_NO_OFFSET
   1657 };
   1658 const struct vnodeop_desc rump_vop_setextattr_desc = {
   1659 	RUMP_VOP_SETEXTATTR_DESCOFFSET,
   1660 	"rump_vop_setextattr",
   1661 	0,
   1662 	rump_vop_setextattr_vp_offsets,
   1663 	VDESC_NO_OFFSET,
   1664 	VOPARG_OFFSETOF(struct rump_vop_setextattr_args, a_cred),
   1665 	VDESC_NO_OFFSET,
   1666 	NULL,
   1667 };
   1668 int
   1669 RUMP_VOP_SETEXTATTR(struct vnode *vp,
   1670     int attrnamespace,
   1671     const char *name,
   1672     struct uio *uio,
   1673     kauth_cred_t cred)
   1674 {
   1675 	int error;
   1676 	bool mpsafe;
   1677 	struct rump_vop_setextattr_args a;
   1678 	a.a_desc = VDESC(rump_vop_setextattr);
   1679 	a.a_vp = vp;
   1680 	a.a_attrnamespace = attrnamespace;
   1681 	a.a_name = name;
   1682 	a.a_uio = uio;
   1683 	a.a_cred = cred;
   1684 	mpsafe = (vp->v_vflag & VV_MPSAFE);
   1685 	if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
   1686 	error = (VCALL(vp, VOFFSET(rump_vop_setextattr), &a));
   1687 	if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
   1688 	return error;
   1689 }
   1690 
   1691 /* End of special cases. */
   1692 
   1693 const struct vnodeop_desc * const rump_vfs_op_descs[] = {
   1694 	&rump_vop_default_desc,	/* MUST BE FIRST */
   1695 	&rump_vop_bwrite_desc,	/* XXX: SPECIAL CASE */
   1696 
   1697 	&rump_vop_lookup_desc,
   1698 	&rump_vop_create_desc,
   1699 	&rump_vop_mknod_desc,
   1700 	&rump_vop_open_desc,
   1701 	&rump_vop_close_desc,
   1702 	&rump_vop_access_desc,
   1703 	&rump_vop_getattr_desc,
   1704 	&rump_vop_setattr_desc,
   1705 	&rump_vop_read_desc,
   1706 	&rump_vop_write_desc,
   1707 	&rump_vop_ioctl_desc,
   1708 	&rump_vop_fcntl_desc,
   1709 	&rump_vop_poll_desc,
   1710 	&rump_vop_kqfilter_desc,
   1711 	&rump_vop_revoke_desc,
   1712 	&rump_vop_mmap_desc,
   1713 	&rump_vop_fsync_desc,
   1714 	&rump_vop_seek_desc,
   1715 	&rump_vop_remove_desc,
   1716 	&rump_vop_link_desc,
   1717 	&rump_vop_rename_desc,
   1718 	&rump_vop_mkdir_desc,
   1719 	&rump_vop_rmdir_desc,
   1720 	&rump_vop_symlink_desc,
   1721 	&rump_vop_readdir_desc,
   1722 	&rump_vop_readlink_desc,
   1723 	&rump_vop_abortop_desc,
   1724 	&rump_vop_inactive_desc,
   1725 	&rump_vop_reclaim_desc,
   1726 	&rump_vop_lock_desc,
   1727 	&rump_vop_unlock_desc,
   1728 	&rump_vop_bmap_desc,
   1729 	&rump_vop_strategy_desc,
   1730 	&rump_vop_print_desc,
   1731 	&rump_vop_islocked_desc,
   1732 	&rump_vop_pathconf_desc,
   1733 	&rump_vop_advlock_desc,
   1734 	&rump_vop_whiteout_desc,
   1735 	&rump_vop_getpages_desc,
   1736 	&rump_vop_putpages_desc,
   1737 	&rump_vop_closeextattr_desc,
   1738 	&rump_vop_getextattr_desc,
   1739 	&rump_vop_listextattr_desc,
   1740 	&rump_vop_openextattr_desc,
   1741 	&rump_vop_deleteextattr_desc,
   1742 	&rump_vop_setextattr_desc,
   1743 	NULL
   1744 };
   1745 
   1746