rumpvnode_if.c revision 1.16 1 /* $NetBSD: rumpvnode_if.c,v 1.16 2014/07/25 08:18:50 dholland 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.67 2014/07/25 08:16:47 dholland Exp
9 * by the script:
10 * NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken 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.16 2014/07/25 08:18:50 dholland 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 int
54 RUMP_VOP_BWRITE(struct vnode *vp,
55 struct buf *bp)
56 {
57 int error;
58
59 rump_schedule();
60 error = VOP_BWRITE(vp, bp);
61 rump_unschedule();
62
63 return error;
64 }
65
66 int
67 RUMP_VOP_LOOKUP(struct vnode *dvp,
68 struct vnode **vpp,
69 struct componentname *cnp)
70 {
71 int error;
72
73 rump_schedule();
74 error = VOP_LOOKUP(dvp, vpp, cnp);
75 rump_unschedule();
76
77 return error;
78 }
79
80 int
81 RUMP_VOP_CREATE(struct vnode *dvp,
82 struct vnode **vpp,
83 struct componentname *cnp,
84 struct vattr *vap)
85 {
86 int error;
87
88 rump_schedule();
89 error = VOP_CREATE(dvp, vpp, cnp, vap);
90 rump_unschedule();
91
92 return error;
93 }
94
95 int
96 RUMP_VOP_MKNOD(struct vnode *dvp,
97 struct vnode **vpp,
98 struct componentname *cnp,
99 struct vattr *vap)
100 {
101 int error;
102
103 rump_schedule();
104 error = VOP_MKNOD(dvp, vpp, cnp, vap);
105 rump_unschedule();
106
107 return error;
108 }
109
110 int
111 RUMP_VOP_OPEN(struct vnode *vp,
112 int mode,
113 struct kauth_cred *cred)
114 {
115 int error;
116
117 rump_schedule();
118 error = VOP_OPEN(vp, mode, cred);
119 rump_unschedule();
120
121 return error;
122 }
123
124 int
125 RUMP_VOP_CLOSE(struct vnode *vp,
126 int fflag,
127 struct kauth_cred *cred)
128 {
129 int error;
130
131 rump_schedule();
132 error = VOP_CLOSE(vp, fflag, cred);
133 rump_unschedule();
134
135 return error;
136 }
137
138 int
139 RUMP_VOP_ACCESS(struct vnode *vp,
140 int mode,
141 struct kauth_cred *cred)
142 {
143 int error;
144
145 rump_schedule();
146 error = VOP_ACCESS(vp, mode, cred);
147 rump_unschedule();
148
149 return error;
150 }
151
152 int
153 RUMP_VOP_GETATTR(struct vnode *vp,
154 struct vattr *vap,
155 struct kauth_cred *cred)
156 {
157 int error;
158
159 rump_schedule();
160 error = VOP_GETATTR(vp, vap, cred);
161 rump_unschedule();
162
163 return error;
164 }
165
166 int
167 RUMP_VOP_SETATTR(struct vnode *vp,
168 struct vattr *vap,
169 struct kauth_cred *cred)
170 {
171 int error;
172
173 rump_schedule();
174 error = VOP_SETATTR(vp, vap, cred);
175 rump_unschedule();
176
177 return error;
178 }
179
180 int
181 RUMP_VOP_READ(struct vnode *vp,
182 struct uio *uio,
183 int ioflag,
184 struct kauth_cred *cred)
185 {
186 int error;
187
188 rump_schedule();
189 error = VOP_READ(vp, uio, ioflag, cred);
190 rump_unschedule();
191
192 return error;
193 }
194
195 int
196 RUMP_VOP_WRITE(struct vnode *vp,
197 struct uio *uio,
198 int ioflag,
199 struct kauth_cred *cred)
200 {
201 int error;
202
203 rump_schedule();
204 error = VOP_WRITE(vp, uio, ioflag, cred);
205 rump_unschedule();
206
207 return error;
208 }
209
210 int
211 RUMP_VOP_FALLOCATE(struct vnode *vp,
212 off_t pos,
213 off_t len)
214 {
215 int error;
216
217 rump_schedule();
218 error = VOP_FALLOCATE(vp, pos, len);
219 rump_unschedule();
220
221 return error;
222 }
223
224 int
225 RUMP_VOP_FDISCARD(struct vnode *vp,
226 off_t pos,
227 off_t len)
228 {
229 int error;
230
231 rump_schedule();
232 error = VOP_FDISCARD(vp, pos, len);
233 rump_unschedule();
234
235 return error;
236 }
237
238 int
239 RUMP_VOP_IOCTL(struct vnode *vp,
240 u_long command,
241 void *data,
242 int fflag,
243 struct kauth_cred *cred)
244 {
245 int error;
246
247 rump_schedule();
248 error = VOP_IOCTL(vp, command, data, fflag, cred);
249 rump_unschedule();
250
251 return error;
252 }
253
254 int
255 RUMP_VOP_FCNTL(struct vnode *vp,
256 u_int command,
257 void *data,
258 int fflag,
259 struct kauth_cred *cred)
260 {
261 int error;
262
263 rump_schedule();
264 error = VOP_FCNTL(vp, command, data, fflag, cred);
265 rump_unschedule();
266
267 return error;
268 }
269
270 int
271 RUMP_VOP_POLL(struct vnode *vp,
272 int events)
273 {
274 int error;
275
276 rump_schedule();
277 error = VOP_POLL(vp, events);
278 rump_unschedule();
279
280 return error;
281 }
282
283 int
284 RUMP_VOP_KQFILTER(struct vnode *vp,
285 struct knote *kn)
286 {
287 int error;
288
289 rump_schedule();
290 error = VOP_KQFILTER(vp, kn);
291 rump_unschedule();
292
293 return error;
294 }
295
296 int
297 RUMP_VOP_REVOKE(struct vnode *vp,
298 int flags)
299 {
300 int error;
301
302 rump_schedule();
303 error = VOP_REVOKE(vp, flags);
304 rump_unschedule();
305
306 return error;
307 }
308
309 int
310 RUMP_VOP_MMAP(struct vnode *vp,
311 int prot,
312 struct kauth_cred *cred)
313 {
314 int error;
315
316 rump_schedule();
317 error = VOP_MMAP(vp, prot, cred);
318 rump_unschedule();
319
320 return error;
321 }
322
323 int
324 RUMP_VOP_FSYNC(struct vnode *vp,
325 struct kauth_cred *cred,
326 int flags,
327 off_t offlo,
328 off_t offhi)
329 {
330 int error;
331
332 rump_schedule();
333 error = VOP_FSYNC(vp, cred, flags, offlo, offhi);
334 rump_unschedule();
335
336 return error;
337 }
338
339 int
340 RUMP_VOP_SEEK(struct vnode *vp,
341 off_t oldoff,
342 off_t newoff,
343 struct kauth_cred *cred)
344 {
345 int error;
346
347 rump_schedule();
348 error = VOP_SEEK(vp, oldoff, newoff, cred);
349 rump_unschedule();
350
351 return error;
352 }
353
354 int
355 RUMP_VOP_REMOVE(struct vnode *dvp,
356 struct vnode *vp,
357 struct componentname *cnp)
358 {
359 int error;
360
361 rump_schedule();
362 error = VOP_REMOVE(dvp, vp, cnp);
363 rump_unschedule();
364
365 return error;
366 }
367
368 int
369 RUMP_VOP_LINK(struct vnode *dvp,
370 struct vnode *vp,
371 struct componentname *cnp)
372 {
373 int error;
374
375 rump_schedule();
376 error = VOP_LINK(dvp, vp, cnp);
377 rump_unschedule();
378
379 return error;
380 }
381
382 int
383 RUMP_VOP_RENAME(struct vnode *fdvp,
384 struct vnode *fvp,
385 struct componentname *fcnp,
386 struct vnode *tdvp,
387 struct vnode *tvp,
388 struct componentname *tcnp)
389 {
390 int error;
391
392 rump_schedule();
393 error = VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp);
394 rump_unschedule();
395
396 return error;
397 }
398
399 int
400 RUMP_VOP_MKDIR(struct vnode *dvp,
401 struct vnode **vpp,
402 struct componentname *cnp,
403 struct vattr *vap)
404 {
405 int error;
406
407 rump_schedule();
408 error = VOP_MKDIR(dvp, vpp, cnp, vap);
409 rump_unschedule();
410
411 return error;
412 }
413
414 int
415 RUMP_VOP_RMDIR(struct vnode *dvp,
416 struct vnode *vp,
417 struct componentname *cnp)
418 {
419 int error;
420
421 rump_schedule();
422 error = VOP_RMDIR(dvp, vp, cnp);
423 rump_unschedule();
424
425 return error;
426 }
427
428 int
429 RUMP_VOP_SYMLINK(struct vnode *dvp,
430 struct vnode **vpp,
431 struct componentname *cnp,
432 struct vattr *vap,
433 char *target)
434 {
435 int error;
436
437 rump_schedule();
438 error = VOP_SYMLINK(dvp, vpp, cnp, vap, target);
439 rump_unschedule();
440
441 return error;
442 }
443
444 int
445 RUMP_VOP_READDIR(struct vnode *vp,
446 struct uio *uio,
447 struct kauth_cred *cred,
448 int *eofflag,
449 off_t **cookies,
450 int *ncookies)
451 {
452 int error;
453
454 rump_schedule();
455 error = VOP_READDIR(vp, uio, cred, eofflag, cookies, ncookies);
456 rump_unschedule();
457
458 return error;
459 }
460
461 int
462 RUMP_VOP_READLINK(struct vnode *vp,
463 struct uio *uio,
464 struct kauth_cred *cred)
465 {
466 int error;
467
468 rump_schedule();
469 error = VOP_READLINK(vp, uio, cred);
470 rump_unschedule();
471
472 return error;
473 }
474
475 int
476 RUMP_VOP_ABORTOP(struct vnode *dvp,
477 struct componentname *cnp)
478 {
479 int error;
480
481 rump_schedule();
482 error = VOP_ABORTOP(dvp, cnp);
483 rump_unschedule();
484
485 return error;
486 }
487
488 int
489 RUMP_VOP_INACTIVE(struct vnode *vp,
490 bool *recycle)
491 {
492 int error;
493
494 rump_schedule();
495 error = VOP_INACTIVE(vp, recycle);
496 rump_unschedule();
497
498 return error;
499 }
500
501 int
502 RUMP_VOP_RECLAIM(struct vnode *vp)
503 {
504 int error;
505
506 rump_schedule();
507 error = VOP_RECLAIM(vp);
508 rump_unschedule();
509
510 return error;
511 }
512
513 int
514 RUMP_VOP_LOCK(struct vnode *vp,
515 int flags)
516 {
517 int error;
518
519 rump_schedule();
520 error = VOP_LOCK(vp, flags);
521 rump_unschedule();
522
523 return error;
524 }
525
526 int
527 RUMP_VOP_UNLOCK(struct vnode *vp)
528 {
529 int error;
530
531 rump_schedule();
532 error = VOP_UNLOCK(vp);
533 rump_unschedule();
534
535 return error;
536 }
537
538 int
539 RUMP_VOP_BMAP(struct vnode *vp,
540 int64_t bn,
541 struct vnode **vpp,
542 int64_t *bnp,
543 int *runp)
544 {
545 int error;
546
547 rump_schedule();
548 error = VOP_BMAP(vp, bn, vpp, bnp, runp);
549 rump_unschedule();
550
551 return error;
552 }
553
554 int
555 RUMP_VOP_STRATEGY(struct vnode *vp,
556 struct buf *bp)
557 {
558 int error;
559
560 rump_schedule();
561 error = VOP_STRATEGY(vp, bp);
562 rump_unschedule();
563
564 return error;
565 }
566
567 int
568 RUMP_VOP_PRINT(struct vnode *vp)
569 {
570 int error;
571
572 rump_schedule();
573 error = VOP_PRINT(vp);
574 rump_unschedule();
575
576 return error;
577 }
578
579 int
580 RUMP_VOP_ISLOCKED(struct vnode *vp)
581 {
582 int error;
583
584 rump_schedule();
585 error = VOP_ISLOCKED(vp);
586 rump_unschedule();
587
588 return error;
589 }
590
591 int
592 RUMP_VOP_PATHCONF(struct vnode *vp,
593 int name,
594 register_t *retval)
595 {
596 int error;
597
598 rump_schedule();
599 error = VOP_PATHCONF(vp, name, retval);
600 rump_unschedule();
601
602 return error;
603 }
604
605 int
606 RUMP_VOP_ADVLOCK(struct vnode *vp,
607 void *id,
608 int op,
609 struct flock *fl,
610 int flags)
611 {
612 int error;
613
614 rump_schedule();
615 error = VOP_ADVLOCK(vp, id, op, fl, flags);
616 rump_unschedule();
617
618 return error;
619 }
620
621 int
622 RUMP_VOP_WHITEOUT(struct vnode *dvp,
623 struct componentname *cnp,
624 int flags)
625 {
626 int error;
627
628 rump_schedule();
629 error = VOP_WHITEOUT(dvp, cnp, flags);
630 rump_unschedule();
631
632 return error;
633 }
634
635 int
636 RUMP_VOP_GETPAGES(struct vnode *vp,
637 off_t offset,
638 struct vm_page **m,
639 int *count,
640 int centeridx,
641 int access_type,
642 int advice,
643 int flags)
644 {
645 int error;
646
647 rump_schedule();
648 error = VOP_GETPAGES(vp, offset, m, count, centeridx, access_type, advice, flags);
649 rump_unschedule();
650
651 return error;
652 }
653
654 int
655 RUMP_VOP_PUTPAGES(struct vnode *vp,
656 off_t offlo,
657 off_t offhi,
658 int flags)
659 {
660 int error;
661
662 rump_schedule();
663 error = VOP_PUTPAGES(vp, offlo, offhi, flags);
664 rump_unschedule();
665
666 return error;
667 }
668
669 int
670 RUMP_VOP_CLOSEEXTATTR(struct vnode *vp,
671 int commit,
672 struct kauth_cred *cred)
673 {
674 int error;
675
676 rump_schedule();
677 error = VOP_CLOSEEXTATTR(vp, commit, cred);
678 rump_unschedule();
679
680 return error;
681 }
682
683 int
684 RUMP_VOP_GETEXTATTR(struct vnode *vp,
685 int attrnamespace,
686 const char *name,
687 struct uio *uio,
688 size_t *size,
689 struct kauth_cred *cred)
690 {
691 int error;
692
693 rump_schedule();
694 error = VOP_GETEXTATTR(vp, attrnamespace, name, uio, size, cred);
695 rump_unschedule();
696
697 return error;
698 }
699
700 int
701 RUMP_VOP_LISTEXTATTR(struct vnode *vp,
702 int attrnamespace,
703 struct uio *uio,
704 size_t *size,
705 int flag,
706 struct kauth_cred *cred)
707 {
708 int error;
709
710 rump_schedule();
711 error = VOP_LISTEXTATTR(vp, attrnamespace, uio, size, flag, cred);
712 rump_unschedule();
713
714 return error;
715 }
716
717 int
718 RUMP_VOP_OPENEXTATTR(struct vnode *vp,
719 struct kauth_cred *cred)
720 {
721 int error;
722
723 rump_schedule();
724 error = VOP_OPENEXTATTR(vp, cred);
725 rump_unschedule();
726
727 return error;
728 }
729
730 int
731 RUMP_VOP_DELETEEXTATTR(struct vnode *vp,
732 int attrnamespace,
733 const char *name,
734 struct kauth_cred *cred)
735 {
736 int error;
737
738 rump_schedule();
739 error = VOP_DELETEEXTATTR(vp, attrnamespace, name, cred);
740 rump_unschedule();
741
742 return error;
743 }
744
745 int
746 RUMP_VOP_SETEXTATTR(struct vnode *vp,
747 int attrnamespace,
748 const char *name,
749 struct uio *uio,
750 struct kauth_cred *cred)
751 {
752 int error;
753
754 rump_schedule();
755 error = VOP_SETEXTATTR(vp, attrnamespace, name, uio, cred);
756 rump_unschedule();
757
758 return error;
759 }
760