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