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