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