2 * Copyright (c) 2004,2009 The DragonFly Project. All rights reserved.
4 * This code is derived from software contributed to The DragonFly Project
5 * by Matthew Dillon <dillon@backplane.com>
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * 3. Neither the name of The DragonFly Project nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific, prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * Implement vnode ops wrappers. All vnode ops are wrapped through
38 * These wrappers are responsible for hanlding all MPSAFE issues related
39 * to a vnode operation.
42 #include <sys/param.h>
43 #include <sys/systm.h>
46 #include <sys/dirent.h>
47 #include <sys/domain.h>
48 #include <sys/eventhandler.h>
49 #include <sys/fcntl.h>
50 #include <sys/kernel.h>
51 #include <sys/kthread.h>
52 #include <sys/malloc.h>
54 #include <sys/mount.h>
56 #include <sys/namei.h>
57 #include <sys/reboot.h>
58 #include <sys/socket.h>
60 #include <sys/sysctl.h>
61 #include <sys/syslog.h>
62 #include <sys/vmmeter.h>
63 #include <sys/vnode.h>
64 #include <sys/vfsops.h>
65 #include <sys/sysmsg.h>
66 #include <sys/vfs_quota.h>
68 #include <machine/limits.h>
71 #include <vm/vm_object.h>
72 #include <vm/vm_extern.h>
73 #include <vm/vm_kern.h>
75 #include <vm/vm_map.h>
76 #include <vm/vm_page.h>
77 #include <vm/vm_pager.h>
78 #include <vm/vnode_pager.h>
79 #include <vm/vm_zone.h>
82 #include <sys/mplock2.h>
84 #define VDESCNAME(name) __CONCAT(__CONCAT(vop_,name),_desc)
86 #define VNODEOP_DESC_INIT(name) \
87 struct syslink_desc VDESCNAME(name) = { \
88 __offsetof(struct vop_ops, __CONCAT(vop_, name)), \
91 VNODEOP_DESC_INIT(default);
92 VNODEOP_DESC_INIT(old_lookup
);
93 VNODEOP_DESC_INIT(old_create
);
94 VNODEOP_DESC_INIT(old_whiteout
);
95 VNODEOP_DESC_INIT(old_mknod
);
96 VNODEOP_DESC_INIT(open
);
97 VNODEOP_DESC_INIT(close
);
98 VNODEOP_DESC_INIT(access
);
99 VNODEOP_DESC_INIT(getattr
);
100 VNODEOP_DESC_INIT(getattr_lite
);
101 VNODEOP_DESC_INIT(setattr
);
102 VNODEOP_DESC_INIT(read
);
103 VNODEOP_DESC_INIT(write
);
104 VNODEOP_DESC_INIT(ioctl
);
105 VNODEOP_DESC_INIT(poll
);
106 VNODEOP_DESC_INIT(kqfilter
);
107 VNODEOP_DESC_INIT(mmap
);
108 VNODEOP_DESC_INIT(fsync
);
109 VNODEOP_DESC_INIT(fdatasync
);
110 VNODEOP_DESC_INIT(old_remove
);
111 VNODEOP_DESC_INIT(old_link
);
112 VNODEOP_DESC_INIT(old_rename
);
114 VNODEOP_DESC_INIT(old_mkdir
);
115 VNODEOP_DESC_INIT(old_rmdir
);
116 VNODEOP_DESC_INIT(old_symlink
);
117 VNODEOP_DESC_INIT(readdir
);
118 VNODEOP_DESC_INIT(readlink
);
119 VNODEOP_DESC_INIT(inactive
);
120 VNODEOP_DESC_INIT(reclaim
);
121 VNODEOP_DESC_INIT(bmap
);
122 VNODEOP_DESC_INIT(strategy
);
123 VNODEOP_DESC_INIT(print
);
124 VNODEOP_DESC_INIT(pathconf
);
125 VNODEOP_DESC_INIT(advlock
);
126 VNODEOP_DESC_INIT(balloc
);
127 VNODEOP_DESC_INIT(reallocblks
);
128 VNODEOP_DESC_INIT(getpages
);
129 VNODEOP_DESC_INIT(putpages
);
130 VNODEOP_DESC_INIT(freeblks
);
131 VNODEOP_DESC_INIT(getacl
);
132 VNODEOP_DESC_INIT(setacl
);
133 VNODEOP_DESC_INIT(aclcheck
);
134 VNODEOP_DESC_INIT(getextattr
);
135 VNODEOP_DESC_INIT(setextattr
);
136 VNODEOP_DESC_INIT(mountctl
);
137 VNODEOP_DESC_INIT(markatime
);
138 VNODEOP_DESC_INIT(allocate
);
140 VNODEOP_DESC_INIT(nresolve
);
141 VNODEOP_DESC_INIT(nlookupdotdot
);
142 VNODEOP_DESC_INIT(ncreate
);
143 VNODEOP_DESC_INIT(nmkdir
);
144 VNODEOP_DESC_INIT(nmknod
);
145 VNODEOP_DESC_INIT(nlink
);
146 VNODEOP_DESC_INIT(nsymlink
);
147 VNODEOP_DESC_INIT(nwhiteout
);
148 VNODEOP_DESC_INIT(nremove
);
149 VNODEOP_DESC_INIT(nrmdir
);
150 VNODEOP_DESC_INIT(nrename
);
152 #define DO_OPS(ops, error, ap, vop_field) \
153 error = ops->vop_field(ap)
155 /************************************************************************
156 * PRIMARY HIGH LEVEL VNODE OPERATIONS CALLS *
157 ************************************************************************
159 * These procedures are called directly from the kernel and/or fileops
160 * code to perform file/device operations on the system.
162 * NOTE: The old namespace api functions such as vop_rename() are no
163 * longer available for general use and have been renamed to
164 * vop_old_*(). Only the code in vfs_default.c is allowed to call
167 * NOTE: The VFS_MPLOCK() macro handle mounts which do not set MNTK_MPSAFE.
173 vop_old_lookup(struct vop_ops
*ops
, struct vnode
*dvp
,
174 struct vnode
**vpp
, struct componentname
*cnp
)
176 struct vop_old_lookup_args ap
;
180 ap
.a_head
.a_desc
= &vop_old_lookup_desc
;
181 ap
.a_head
.a_ops
= ops
;
185 VFS_MPLOCK(dvp
->v_mount
);
186 DO_OPS(ops
, error
, &ap
, vop_old_lookup
);
196 vop_old_create(struct vop_ops
*ops
, struct vnode
*dvp
,
197 struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
199 struct vop_old_create_args ap
;
203 ap
.a_head
.a_desc
= &vop_old_create_desc
;
204 ap
.a_head
.a_ops
= ops
;
210 VFS_MPLOCK(dvp
->v_mount
);
211 DO_OPS(ops
, error
, &ap
, vop_old_create
);
221 vop_old_whiteout(struct vop_ops
*ops
, struct vnode
*dvp
,
222 struct componentname
*cnp
, int flags
)
224 struct vop_old_whiteout_args ap
;
228 ap
.a_head
.a_desc
= &vop_old_whiteout_desc
;
229 ap
.a_head
.a_ops
= ops
;
234 VFS_MPLOCK(dvp
->v_mount
);
235 DO_OPS(ops
, error
, &ap
, vop_old_whiteout
);
245 vop_old_mknod(struct vop_ops
*ops
, struct vnode
*dvp
,
246 struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
248 struct vop_old_mknod_args ap
;
252 ap
.a_head
.a_desc
= &vop_old_mknod_desc
;
253 ap
.a_head
.a_ops
= ops
;
259 VFS_MPLOCK(dvp
->v_mount
);
260 DO_OPS(ops
, error
, &ap
, vop_old_mknod
);
267 * NOTE: VAGE is always cleared when calling VOP_OPEN().
270 vop_open(struct vop_ops
*ops
, struct vnode
*vp
, int mode
, struct ucred
*cred
,
273 struct vop_open_args ap
;
278 * Decrement 3-2-1-0. Does not decrement beyond 0
280 if (vp
->v_flag
& VAGE0
) {
281 vclrflags(vp
, VAGE0
);
282 } else if (vp
->v_flag
& VAGE1
) {
283 vclrflags(vp
, VAGE1
);
284 vsetflags(vp
, VAGE0
);
287 ap
.a_head
.a_desc
= &vop_open_desc
;
288 ap
.a_head
.a_ops
= ops
;
294 VFS_MPLOCK(vp
->v_mount
);
295 DO_OPS(ops
, error
, &ap
, vop_open
);
305 vop_close(struct vop_ops
*ops
, struct vnode
*vp
, int fflag
, struct file
*fp
)
307 struct vop_close_args ap
;
311 ap
.a_head
.a_desc
= &vop_close_desc
;
312 ap
.a_head
.a_ops
= ops
;
317 VFS_MPLOCK(vp
->v_mount
);
318 DO_OPS(ops
, error
, &ap
, vop_close
);
328 vop_access(struct vop_ops
*ops
, struct vnode
*vp
, int mode
, int flags
,
331 struct vop_access_args ap
;
335 ap
.a_head
.a_desc
= &vop_access_desc
;
336 ap
.a_head
.a_ops
= ops
;
342 VFS_MPLOCK(vp
->v_mount
);
343 DO_OPS(ops
, error
, &ap
, vop_access
);
353 vop_getattr(struct vop_ops
*ops
, struct vnode
*vp
, struct vattr
*vap
,
356 struct vop_getattr_args ap
;
360 ap
.a_head
.a_desc
= &vop_getattr_desc
;
361 ap
.a_head
.a_ops
= ops
;
366 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_GA_MPSAFE
);
367 DO_OPS(ops
, error
, &ap
, vop_getattr
);
377 vop_getattr_lite(struct vop_ops
*ops
, struct vnode
*vp
, struct vattr_lite
*lvap
)
379 struct vop_getattr_lite_args ap
;
383 ap
.a_head
.a_desc
= &vop_getattr_lite_desc
;
384 ap
.a_head
.a_ops
= ops
;
389 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_GA_MPSAFE
);
390 DO_OPS(ops
, error
, &ap
, vop_getattr_lite
);
400 vop_setattr(struct vop_ops
*ops
, struct vnode
*vp
, struct vattr
*vap
,
401 struct ucred
*cred
, struct file
*fp
)
403 struct vop_setattr_args ap
;
407 ap
.a_head
.a_desc
= &vop_setattr_desc
;
408 ap
.a_head
.a_ops
= ops
;
414 VFS_MPLOCK(vp
->v_mount
);
415 DO_OPS(ops
, error
, &ap
, vop_setattr
);
425 vop_read(struct vop_ops
*ops
, struct vnode
*vp
, struct uio
*uio
, int ioflag
,
426 struct ucred
*cred
, struct file
*fp
)
428 struct vop_read_args ap
;
432 ap
.a_head
.a_desc
= &vop_read_desc
;
433 ap
.a_head
.a_ops
= ops
;
436 ap
.a_ioflag
= ioflag
;
440 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_RD_MPSAFE
);
441 DO_OPS(ops
, error
, &ap
, vop_read
);
451 vop_write(struct vop_ops
*ops
, struct vnode
*vp
, struct uio
*uio
, int ioflag
,
452 struct ucred
*cred
, struct file
*fp
)
454 struct vop_write_args ap
;
456 int error
, do_accounting
= 0;
458 uint64_t size_before
=0, size_after
=0;
460 uint64_t offset
, delta
;
462 ap
.a_head
.a_desc
= &vop_write_desc
;
463 ap
.a_head
.a_ops
= ops
;
466 ap
.a_ioflag
= ioflag
;
470 /* is this a regular vnode ? */
471 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_WR_MPSAFE
);
472 if (vfs_quota_enabled
&& (vp
->v_type
== VREG
)) {
473 if ((error
= VOP_GETATTR(vp
, &va
)) != 0)
475 size_before
= va
.va_size
;
476 /* this file may already have been removed */
480 offset
= uio
->uio_offset
;
481 if (ioflag
& IO_APPEND
)
482 offset
= size_before
;
483 size_after
= offset
+ uio
->uio_resid
;
484 if (size_after
< size_before
)
485 size_after
= size_before
;
486 delta
= size_after
- size_before
;
489 if (!vq_write_ok(mp
, va
.va_uid
, va
.va_gid
, delta
)) {
494 DO_OPS(ops
, error
, &ap
, vop_write
);
495 if ((error
== 0) && do_accounting
) {
496 VFS_ACCOUNT(mp
, va
.va_uid
, va
.va_gid
, size_after
- size_before
);
508 vop_ioctl(struct vop_ops
*ops
, struct vnode
*vp
, u_long command
, caddr_t data
,
509 int fflag
, struct ucred
*cred
, struct sysmsg
*msg
)
511 struct vop_ioctl_args ap
;
515 ap
.a_head
.a_desc
= &vop_ioctl_desc
;
516 ap
.a_head
.a_ops
= ops
;
518 ap
.a_command
= command
;
524 VFS_MPLOCK(vp
->v_mount
);
525 DO_OPS(ops
, error
, &ap
, vop_ioctl
);
535 vop_poll(struct vop_ops
*ops
, struct vnode
*vp
, int events
, struct ucred
*cred
)
537 struct vop_poll_args ap
;
541 ap
.a_head
.a_desc
= &vop_poll_desc
;
542 ap
.a_head
.a_ops
= ops
;
544 ap
.a_events
= events
;
547 VFS_MPLOCK(vp
->v_mount
);
548 DO_OPS(ops
, error
, &ap
, vop_poll
);
558 vop_kqfilter(struct vop_ops
*ops
, struct vnode
*vp
, struct knote
*kn
)
560 struct vop_kqfilter_args ap
;
564 ap
.a_head
.a_desc
= &vop_kqfilter_desc
;
565 ap
.a_head
.a_ops
= ops
;
569 VFS_MPLOCK(vp
->v_mount
);
570 DO_OPS(ops
, error
, &ap
, vop_kqfilter
);
580 vop_mmap(struct vop_ops
*ops
, struct vnode
*vp
, int fflags
, struct ucred
*cred
)
582 struct vop_mmap_args ap
;
586 ap
.a_head
.a_desc
= &vop_mmap_desc
;
587 ap
.a_head
.a_ops
= ops
;
589 ap
.a_fflags
= fflags
;
592 VFS_MPLOCK(vp
->v_mount
);
593 DO_OPS(ops
, error
, &ap
, vop_mmap
);
603 vop_fsync(struct vop_ops
*ops
, struct vnode
*vp
, int waitfor
, int flags
,
606 struct vop_fsync_args ap
;
610 ap
.a_head
.a_desc
= &vop_fsync_desc
;
611 ap
.a_head
.a_ops
= ops
;
613 ap
.a_waitfor
= waitfor
;
617 VFS_MPLOCK(vp
->v_mount
);
618 DO_OPS(ops
, error
, &ap
, vop_fsync
);
628 vop_fdatasync(struct vop_ops
*ops
, struct vnode
*vp
, int waitfor
, int flags
,
631 struct vop_fdatasync_args ap
;
635 ap
.a_head
.a_desc
= &vop_fdatasync_desc
;
636 ap
.a_head
.a_ops
= ops
;
638 ap
.a_waitfor
= waitfor
;
642 VFS_MPLOCK(vp
->v_mount
);
643 DO_OPS(ops
, error
, &ap
, vop_fdatasync
);
653 vop_old_remove(struct vop_ops
*ops
, struct vnode
*dvp
,
654 struct vnode
*vp
, struct componentname
*cnp
)
656 struct vop_old_remove_args ap
;
660 ap
.a_head
.a_desc
= &vop_old_remove_desc
;
661 ap
.a_head
.a_ops
= ops
;
666 VFS_MPLOCK(dvp
->v_mount
);
667 DO_OPS(ops
, error
, &ap
, vop_old_remove
);
677 vop_old_link(struct vop_ops
*ops
, struct vnode
*tdvp
,
678 struct vnode
*vp
, struct componentname
*cnp
)
680 struct vop_old_link_args ap
;
684 ap
.a_head
.a_desc
= &vop_old_link_desc
;
685 ap
.a_head
.a_ops
= ops
;
690 VFS_MPLOCK(tdvp
->v_mount
);
691 DO_OPS(ops
, error
, &ap
, vop_old_link
);
701 vop_old_rename(struct vop_ops
*ops
,
702 struct vnode
*fdvp
, struct vnode
*fvp
, struct componentname
*fcnp
,
703 struct vnode
*tdvp
, struct vnode
*tvp
, struct componentname
*tcnp
)
705 struct vop_old_rename_args ap
;
709 ap
.a_head
.a_desc
= &vop_old_rename_desc
;
710 ap
.a_head
.a_ops
= ops
;
718 VFS_MPLOCK(tdvp
->v_mount
);
719 DO_OPS(ops
, error
, &ap
, vop_old_rename
);
729 vop_old_mkdir(struct vop_ops
*ops
, struct vnode
*dvp
,
730 struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
732 struct vop_old_mkdir_args ap
;
736 ap
.a_head
.a_desc
= &vop_old_mkdir_desc
;
737 ap
.a_head
.a_ops
= ops
;
743 VFS_MPLOCK(dvp
->v_mount
);
744 DO_OPS(ops
, error
, &ap
, vop_old_mkdir
);
754 vop_old_rmdir(struct vop_ops
*ops
, struct vnode
*dvp
,
755 struct vnode
*vp
, struct componentname
*cnp
)
757 struct vop_old_rmdir_args ap
;
761 ap
.a_head
.a_desc
= &vop_old_rmdir_desc
;
762 ap
.a_head
.a_ops
= ops
;
767 VFS_MPLOCK(dvp
->v_mount
);
768 DO_OPS(ops
, error
, &ap
, vop_old_rmdir
);
778 vop_old_symlink(struct vop_ops
*ops
, struct vnode
*dvp
,
779 struct vnode
**vpp
, struct componentname
*cnp
,
780 struct vattr
*vap
, char *target
)
782 struct vop_old_symlink_args ap
;
786 ap
.a_head
.a_desc
= &vop_old_symlink_desc
;
787 ap
.a_head
.a_ops
= ops
;
792 ap
.a_target
= target
;
794 VFS_MPLOCK(dvp
->v_mount
);
795 DO_OPS(ops
, error
, &ap
, vop_old_symlink
);
805 vop_readdir(struct vop_ops
*ops
, struct vnode
*vp
, struct uio
*uio
,
806 struct ucred
*cred
, int *eofflag
, int *ncookies
, off_t
**cookies
,
809 struct vop_readdir_args ap
;
813 ap
.a_head
.a_desc
= &vop_readdir_desc
;
814 ap
.a_head
.a_ops
= ops
;
818 ap
.a_eofflag
= eofflag
;
819 ap
.a_ncookies
= ncookies
;
820 ap
.a_cookies
= cookies
;
823 VFS_MPLOCK(vp
->v_mount
);
824 DO_OPS(ops
, error
, &ap
, vop_readdir
);
834 vop_readlink(struct vop_ops
*ops
, struct vnode
*vp
, struct uio
*uio
,
837 struct vop_readlink_args ap
;
841 ap
.a_head
.a_desc
= &vop_readlink_desc
;
842 ap
.a_head
.a_ops
= ops
;
847 VFS_MPLOCK(vp
->v_mount
);
848 DO_OPS(ops
, error
, &ap
, vop_readlink
);
858 vop_inactive(struct vop_ops
*ops
, struct vnode
*vp
)
860 struct vop_inactive_args ap
;
865 ap
.a_head
.a_desc
= &vop_inactive_desc
;
866 ap
.a_head
.a_ops
= ops
;
870 * WARNING! Deactivation of the vnode can cause it to be recycled,
871 * clearing vp->v_mount.
874 VFS_MPLOCK_FLAG(mp
, MNTK_IN_MPSAFE
);
875 DO_OPS(ops
, error
, &ap
, vop_inactive
);
885 vop_reclaim(struct vop_ops
*ops
, struct vnode
*vp
)
887 struct vop_reclaim_args ap
;
892 ap
.a_head
.a_desc
= &vop_reclaim_desc
;
893 ap
.a_head
.a_ops
= ops
;
897 * WARNING! Reclamation of the vnode will clear vp->v_mount.
901 DO_OPS(ops
, error
, &ap
, vop_reclaim
);
911 vop_bmap(struct vop_ops
*ops
, struct vnode
*vp
, off_t loffset
,
912 off_t
*doffsetp
, int *runp
, int *runb
, buf_cmd_t cmd
)
914 struct vop_bmap_args ap
;
918 ap
.a_head
.a_desc
= &vop_bmap_desc
;
919 ap
.a_head
.a_ops
= ops
;
921 ap
.a_loffset
= loffset
;
922 ap
.a_doffsetp
= doffsetp
;
927 VFS_MPLOCK(vp
->v_mount
);
928 DO_OPS(ops
, error
, &ap
, vop_bmap
);
935 * WARNING! Vnode can go-away after the ops call (e.g. async flush
936 * from buffer kthread).
939 vop_strategy(struct vop_ops
*ops
, struct vnode
*vp
, struct bio
*bio
)
941 struct vop_strategy_args ap
;
945 ap
.a_head
.a_desc
= &vop_strategy_desc
;
946 ap
.a_head
.a_ops
= ops
;
951 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_SG_MPSAFE
);
952 DO_OPS(ops
, error
, &ap
, vop_strategy
);
955 /* ugly hack for swap */
957 DO_OPS(ops
, error
, &ap
, vop_strategy
);
967 vop_print(struct vop_ops
*ops
, struct vnode
*vp
)
969 struct vop_print_args ap
;
973 ap
.a_head
.a_desc
= &vop_print_desc
;
974 ap
.a_head
.a_ops
= ops
;
977 VFS_MPLOCK(vp
->v_mount
);
978 DO_OPS(ops
, error
, &ap
, vop_print
);
988 vop_pathconf(struct vop_ops
*ops
, struct vnode
*vp
, int name
,
991 struct vop_pathconf_args ap
;
995 ap
.a_head
.a_desc
= &vop_pathconf_desc
;
996 ap
.a_head
.a_ops
= ops
;
999 ap
.a_retval
= retval
;
1001 VFS_MPLOCK(vp
->v_mount
);
1002 DO_OPS(ops
, error
, &ap
, vop_pathconf
);
1012 vop_advlock(struct vop_ops
*ops
, struct vnode
*vp
, caddr_t id
, int op
,
1013 struct flock
*fl
, int flags
)
1015 struct vop_advlock_args ap
;
1019 ap
.a_head
.a_desc
= &vop_advlock_desc
;
1020 ap
.a_head
.a_ops
= ops
;
1027 VFS_MPLOCK(vp
->v_mount
);
1028 DO_OPS(ops
, error
, &ap
, vop_advlock
);
1038 vop_balloc(struct vop_ops
*ops
, struct vnode
*vp
, off_t startoffset
,
1039 int size
, struct ucred
*cred
, int flags
,
1042 struct vop_balloc_args ap
;
1046 ap
.a_head
.a_desc
= &vop_balloc_desc
;
1047 ap
.a_head
.a_ops
= ops
;
1049 ap
.a_startoffset
= startoffset
;
1055 VFS_MPLOCK(vp
->v_mount
);
1056 DO_OPS(ops
, error
, &ap
, vop_balloc
);
1066 vop_reallocblks(struct vop_ops
*ops
, struct vnode
*vp
,
1067 struct cluster_save
*buflist
)
1069 struct vop_reallocblks_args ap
;
1073 ap
.a_head
.a_desc
= &vop_reallocblks_desc
;
1074 ap
.a_head
.a_ops
= ops
;
1076 ap
.a_buflist
= buflist
;
1078 VFS_MPLOCK(vp
->v_mount
);
1079 DO_OPS(ops
, error
, &ap
, vop_reallocblks
);
1089 vop_getpages(struct vop_ops
*ops
, struct vnode
*vp
, vm_page_t
*m
, int count
,
1090 int reqpage
, vm_ooffset_t offset
, int seqaccess
)
1092 struct vop_getpages_args ap
;
1096 ap
.a_head
.a_desc
= &vop_getpages_desc
;
1097 ap
.a_head
.a_ops
= ops
;
1101 ap
.a_reqpage
= reqpage
;
1102 ap
.a_offset
= offset
;
1103 ap
.a_seqaccess
= seqaccess
;
1105 VFS_MPLOCK(vp
->v_mount
);
1106 DO_OPS(ops
, error
, &ap
, vop_getpages
);
1116 vop_putpages(struct vop_ops
*ops
, struct vnode
*vp
, vm_page_t
*m
, int count
,
1117 int flags
, int *rtvals
, vm_ooffset_t offset
)
1119 struct vop_putpages_args ap
;
1123 ap
.a_head
.a_desc
= &vop_putpages_desc
;
1124 ap
.a_head
.a_ops
= ops
;
1129 ap
.a_rtvals
= rtvals
;
1130 ap
.a_offset
= offset
;
1132 VFS_MPLOCK(vp
->v_mount
);
1133 DO_OPS(ops
, error
, &ap
, vop_putpages
);
1143 vop_freeblks(struct vop_ops
*ops
, struct vnode
*vp
, off_t offset
, int length
)
1145 struct vop_freeblks_args ap
;
1149 ap
.a_head
.a_desc
= &vop_freeblks_desc
;
1150 ap
.a_head
.a_ops
= ops
;
1152 ap
.a_offset
= offset
;
1153 ap
.a_length
= length
;
1155 VFS_MPLOCK(vp
->v_mount
);
1156 DO_OPS(ops
, error
, &ap
, vop_freeblks
);
1166 vop_getacl(struct vop_ops
*ops
, struct vnode
*vp
, acl_type_t type
,
1167 struct acl
*aclp
, struct ucred
*cred
)
1169 struct vop_getacl_args ap
;
1173 ap
.a_head
.a_desc
= &vop_getacl_desc
;
1174 ap
.a_head
.a_ops
= ops
;
1180 VFS_MPLOCK(vp
->v_mount
);
1181 DO_OPS(ops
, error
, &ap
, vop_getacl
);
1191 vop_setacl(struct vop_ops
*ops
, struct vnode
*vp
, acl_type_t type
,
1192 struct acl
*aclp
, struct ucred
*cred
)
1194 struct vop_setacl_args ap
;
1198 ap
.a_head
.a_desc
= &vop_setacl_desc
;
1199 ap
.a_head
.a_ops
= ops
;
1205 VFS_MPLOCK(vp
->v_mount
);
1206 DO_OPS(ops
, error
, &ap
, vop_setacl
);
1216 vop_aclcheck(struct vop_ops
*ops
, struct vnode
*vp
, acl_type_t type
,
1217 struct acl
*aclp
, struct ucred
*cred
)
1219 struct vop_aclcheck_args ap
;
1223 ap
.a_head
.a_desc
= &vop_aclcheck_desc
;
1224 ap
.a_head
.a_ops
= ops
;
1230 VFS_MPLOCK(vp
->v_mount
);
1231 DO_OPS(ops
, error
, &ap
, vop_aclcheck
);
1241 vop_getextattr(struct vop_ops
*ops
, struct vnode
*vp
, int attrnamespace
,
1242 char *attrname
, struct uio
*uio
, struct ucred
*cred
)
1244 struct vop_getextattr_args ap
;
1248 ap
.a_head
.a_desc
= &vop_getextattr_desc
;
1249 ap
.a_head
.a_ops
= ops
;
1251 ap
.a_attrnamespace
= attrnamespace
;
1252 ap
.a_attrname
= attrname
;
1256 VFS_MPLOCK(vp
->v_mount
);
1257 DO_OPS(ops
, error
, &ap
, vop_getextattr
);
1267 vop_setextattr(struct vop_ops
*ops
, struct vnode
*vp
, int attrnamespace
,
1268 char *attrname
, struct uio
*uio
, struct ucred
*cred
)
1270 struct vop_setextattr_args ap
;
1274 ap
.a_head
.a_desc
= &vop_setextattr_desc
;
1275 ap
.a_head
.a_ops
= ops
;
1277 ap
.a_attrnamespace
= attrnamespace
;
1278 ap
.a_attrname
= attrname
;
1282 VFS_MPLOCK(vp
->v_mount
);
1283 DO_OPS(ops
, error
, &ap
, vop_setextattr
);
1293 vop_mountctl(struct vop_ops
*ops
, struct vnode
*vp
, int op
, struct file
*fp
,
1294 const void *ctl
, int ctllen
, void *buf
, int buflen
, int *res
)
1296 struct vop_mountctl_args ap
;
1300 ap
.a_head
.a_desc
= &vop_mountctl_desc
;
1301 ap
.a_head
.a_ops
= ops
;
1305 ap
.a_ctllen
= ctllen
;
1307 ap
.a_buflen
= buflen
;
1310 VFS_MPLOCK(vp
->v_mount
);
1311 DO_OPS(ops
, error
, &ap
, vop_mountctl
);
1321 vop_markatime(struct vop_ops
*ops
, struct vnode
*vp
, struct ucred
*cred
)
1323 struct vop_markatime_args ap
;
1327 ap
.a_head
.a_desc
= &vop_markatime_desc
;
1328 ap
.a_head
.a_ops
= ops
;
1332 VFS_MPLOCK(vp
->v_mount
);
1333 DO_OPS(ops
, error
, &ap
, vop_markatime
);
1343 vop_allocate(struct vop_ops
*ops
, struct vnode
*vp
, off_t offset
, off_t len
)
1345 struct vop_allocate_args ap
;
1349 ap
.a_head
.a_desc
= &vop_allocate_desc
;
1350 ap
.a_head
.a_ops
= ops
;
1352 ap
.a_offset
= offset
;
1355 VFS_MPLOCK(vp
->v_mount
);
1356 DO_OPS(ops
, error
, &ap
, vop_allocate
);
1365 * nresolve takes a locked ncp, a referenced but unlocked dvp, and a cred,
1366 * and resolves the ncp into a positive or negative hit.
1368 * The namecache is automatically adjusted by this function. The ncp
1369 * is left locked on return.
1374 vop_nresolve(struct vop_ops
*ops
, struct nchandle
*nch
,
1375 struct vnode
*dvp
, struct ucred
*cred
)
1377 struct vop_nresolve_args ap
;
1381 ap
.a_head
.a_desc
= &vop_nresolve_desc
;
1382 ap
.a_head
.a_ops
= ops
;
1387 VFS_MPLOCK(dvp
->v_mount
);
1388 DO_OPS(ops
, error
, &ap
, vop_nresolve
);
1395 * nlookupdotdot takes an unlocked directory, referenced dvp, and looks
1396 * up "..", returning a locked parent directory in *vpp. If an error
1397 * occurs *vpp will be NULL.
1402 vop_nlookupdotdot(struct vop_ops
*ops
, struct vnode
*dvp
,
1403 struct vnode
**vpp
, struct ucred
*cred
, char **fakename
)
1405 struct vop_nlookupdotdot_args ap
;
1409 ap
.a_head
.a_desc
= &vop_nlookupdotdot_desc
;
1410 ap
.a_head
.a_ops
= ops
;
1414 ap
.a_fakename
= fakename
;
1416 VFS_MPLOCK(dvp
->v_mount
);
1417 DO_OPS(ops
, error
, &ap
, vop_nlookupdotdot
);
1424 * ncreate takes a locked, resolved ncp that typically represents a negative
1425 * cache hit and creates the file or node specified by the ncp, cred, and
1426 * vattr. If no error occurs a locked vnode is returned in *vpp.
1428 * The dvp passed in is referenced but unlocked.
1430 * The namecache is automatically adjusted by this function. The ncp
1431 * is left locked on return.
1436 vop_ncreate(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1437 struct vnode
**vpp
, struct ucred
*cred
, struct vattr
*vap
)
1439 struct vop_ncreate_args ap
;
1443 ap
.a_head
.a_desc
= &vop_ncreate_desc
;
1444 ap
.a_head
.a_ops
= ops
;
1451 VFS_MPLOCK(dvp
->v_mount
);
1452 DO_OPS(ops
, error
, &ap
, vop_ncreate
);
1459 * nmkdir takes a locked, resolved ncp that typically represents a negative
1460 * cache hit and creates the directory specified by the ncp, cred, and
1461 * vattr. If no error occurs a locked vnode is returned in *vpp.
1463 * The dvp passed in is referenced but unlocked.
1465 * The namecache is automatically adjusted by this function. The ncp
1466 * is left locked on return.
1471 vop_nmkdir(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1472 struct vnode
**vpp
, struct ucred
*cred
, struct vattr
*vap
)
1474 struct vop_nmkdir_args ap
;
1478 ap
.a_head
.a_desc
= &vop_nmkdir_desc
;
1479 ap
.a_head
.a_ops
= ops
;
1486 VFS_MPLOCK(dvp
->v_mount
);
1487 DO_OPS(ops
, error
, &ap
, vop_nmkdir
);
1494 * nmknod takes a locked, resolved ncp that typically represents a negative
1495 * cache hit and creates the node specified by the ncp, cred, and
1496 * vattr. If no error occurs a locked vnode is returned in *vpp.
1498 * The dvp passed in is referenced but unlocked.
1500 * The namecache is automatically adjusted by this function. The ncp
1501 * is left locked on return.
1506 vop_nmknod(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1507 struct vnode
**vpp
, struct ucred
*cred
, struct vattr
*vap
)
1509 struct vop_nmknod_args ap
;
1513 ap
.a_head
.a_desc
= &vop_nmknod_desc
;
1514 ap
.a_head
.a_ops
= ops
;
1521 VFS_MPLOCK(dvp
->v_mount
);
1522 DO_OPS(ops
, error
, &ap
, vop_nmknod
);
1529 * nlink takes a locked, resolved ncp that typically represents a negative
1530 * cache hit and creates the node specified by the ncp, cred, and
1531 * existing vnode. The passed vp must be locked and will remain locked
1532 * on return, as does the ncp, whether an error occurs or not.
1534 * The dvp passed in is referenced but unlocked.
1536 * The namecache is automatically adjusted by this function. The ncp
1537 * is left locked on return.
1542 vop_nlink(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1543 struct vnode
*vp
, struct ucred
*cred
)
1545 struct vop_nlink_args ap
;
1549 ap
.a_head
.a_desc
= &vop_nlink_desc
;
1550 ap
.a_head
.a_ops
= ops
;
1556 VFS_MPLOCK(dvp
->v_mount
);
1557 DO_OPS(ops
, error
, &ap
, vop_nlink
);
1564 * nsymlink takes a locked, resolved ncp that typically represents a negative
1565 * cache hit and creates a symbolic link based on cred, vap, and target (the
1566 * contents of the link). If no error occurs a locked vnode is returned in
1569 * The dvp passed in is referenced but unlocked.
1571 * The namecache is automatically adjusted by this function. The ncp
1572 * is left locked on return.
1577 vop_nsymlink(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1578 struct vnode
**vpp
, struct ucred
*cred
,
1579 struct vattr
*vap
, char *target
)
1581 struct vop_nsymlink_args ap
;
1585 ap
.a_head
.a_desc
= &vop_nsymlink_desc
;
1586 ap
.a_head
.a_ops
= ops
;
1592 ap
.a_target
= target
;
1594 VFS_MPLOCK(dvp
->v_mount
);
1595 DO_OPS(ops
, error
, &ap
, vop_nsymlink
);
1602 * nwhiteout takes a locked, resolved ncp that can represent a positive or
1603 * negative hit and executes the whiteout function specified in flags.
1605 * The dvp passed in is referenced but unlocked.
1607 * The namecache is automatically adjusted by this function. The ncp
1608 * is left locked on return.
1613 vop_nwhiteout(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1614 struct ucred
*cred
, int flags
)
1616 struct vop_nwhiteout_args ap
;
1620 ap
.a_head
.a_desc
= &vop_nwhiteout_desc
;
1621 ap
.a_head
.a_ops
= ops
;
1627 VFS_MPLOCK(dvp
->v_mount
);
1628 DO_OPS(ops
, error
, &ap
, vop_nwhiteout
);
1635 * nremove takes a locked, resolved ncp that generally represents a
1636 * positive hit and removes the file.
1638 * The dvp passed in is referenced but unlocked.
1640 * The namecache is automatically adjusted by this function. The ncp
1641 * is left locked on return.
1646 vop_nremove(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1649 struct vop_nremove_args ap
;
1654 ap
.a_head
.a_desc
= &vop_nremove_desc
;
1655 ap
.a_head
.a_ops
= ops
;
1660 if ((error
= VOP_GETATTR(nch
->ncp
->nc_vp
, &va
)) != 0)
1663 VFS_MPLOCK(dvp
->v_mount
);
1664 DO_OPS(ops
, error
, &ap
, vop_nremove
);
1665 /* Only update space counters if this is the last hard link */
1666 if ((error
== 0) && (va
.va_nlink
== 1)) {
1667 VFS_ACCOUNT(nch
->mount
, va
.va_uid
, va
.va_gid
, -va
.va_size
);
1675 * nrmdir takes a locked, resolved ncp that generally represents a
1676 * directory and removes the directory.
1678 * The dvp passed in is referenced but unlocked.
1680 * The namecache is automatically adjusted by this function. The ncp
1681 * is left locked on return.
1686 vop_nrmdir(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1689 struct vop_nrmdir_args ap
;
1693 ap
.a_head
.a_desc
= &vop_nrmdir_desc
;
1694 ap
.a_head
.a_ops
= ops
;
1699 VFS_MPLOCK(dvp
->v_mount
);
1700 DO_OPS(ops
, error
, &ap
, vop_nrmdir
);
1707 * nrename takes TWO locked, resolved ncp's and the cred of the caller
1708 * and renames the source ncp to the target ncp. The target ncp may
1709 * represent a positive or negative hit.
1711 * The fdvp and tdvp passed in are referenced but unlocked.
1713 * The namecache is automatically adjusted by this function. The ncp
1714 * is left locked on return. The source ncp is typically changed to
1715 * a negative cache hit and the target ncp typically takes on the
1716 * source ncp's underlying file.
1721 vop_nrename(struct vop_ops
*ops
,
1722 struct nchandle
*fnch
, struct nchandle
*tnch
,
1723 struct vnode
*fdvp
, struct vnode
*tdvp
,
1726 struct vop_nrename_args ap
;
1730 ap
.a_head
.a_desc
= &vop_nrename_desc
;
1731 ap
.a_head
.a_ops
= ops
;
1738 VFS_MPLOCK(fdvp
->v_mount
);
1739 DO_OPS(ops
, error
, &ap
, vop_nrename
);
1745 /************************************************************************
1746 * PRIMARY VNODE OPERATIONS FORWARDING CALLS *
1747 ************************************************************************
1749 * These procedures are called from VFSs such as nullfs
1750 * when they wish to forward an operation on one VFS to another. The
1751 * argument structure/message is modified and then directly passed to the
1752 * appropriate routine. This routines may also be called by initiators
1753 * who have an argument structure in hand rather then discreet arguments.
1755 * MPSAFE - Caller expected to already hold the appropriate vfs lock.
1758 vop_vnoperate_ap(struct vop_generic_args
*ap
)
1760 struct vop_ops
*ops
;
1764 error
= VOCALL(ops
, ap
);
1770 * This routine is called by the cache coherency layer to execute the actual
1771 * VFS operation. If a journaling layer is present we call though it, else
1772 * we call the native VOP functions.
1775 vop_cache_operate_ap(struct vop_generic_args
*ap
)
1777 struct vop_ops
*ops
;
1781 if (ops
->head
.vv_mount
->mnt_vn_journal_ops
)
1782 error
= VOCALL(ops
->head
.vv_mount
->mnt_vn_journal_ops
, ap
);
1784 error
= VOCALL(ops
->head
.vv_mount
->mnt_vn_norm_ops
, ap
);
1790 * This routine is called by the journaling layer to execute the actual
1794 vop_journal_operate_ap(struct vop_generic_args
*ap
)
1796 struct vop_ops
*ops
;
1800 error
= VOCALL(ops
->head
.vv_mount
->mnt_vn_norm_ops
, ap
);
1806 vop_open_ap(struct vop_open_args
*ap
)
1810 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_open
);
1815 vop_close_ap(struct vop_close_args
*ap
)
1819 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_close
);
1824 vop_access_ap(struct vop_access_args
*ap
)
1828 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_access
);
1833 vop_getattr_ap(struct vop_getattr_args
*ap
)
1837 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getattr
);
1842 vop_getattr_lite_ap(struct vop_getattr_lite_args
*ap
)
1846 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getattr_lite
);
1851 vop_setattr_ap(struct vop_setattr_args
*ap
)
1855 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_setattr
);
1860 vop_read_ap(struct vop_read_args
*ap
)
1864 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_read
);
1869 vop_write_ap(struct vop_write_args
*ap
)
1873 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_write
);
1878 vop_ioctl_ap(struct vop_ioctl_args
*ap
)
1882 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_ioctl
);
1887 vop_poll_ap(struct vop_poll_args
*ap
)
1891 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_poll
);
1896 vop_kqfilter_ap(struct vop_kqfilter_args
*ap
)
1900 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_kqfilter
);
1905 vop_mmap_ap(struct vop_mmap_args
*ap
)
1909 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_mmap
);
1914 vop_fsync_ap(struct vop_fsync_args
*ap
)
1918 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_fsync
);
1923 vop_fdatasync_ap(struct vop_fdatasync_args
*ap
)
1927 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_fdatasync
);
1932 vop_readdir_ap(struct vop_readdir_args
*ap
)
1936 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_readdir
);
1941 vop_readlink_ap(struct vop_readlink_args
*ap
)
1945 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_readlink
);
1950 vop_inactive_ap(struct vop_inactive_args
*ap
)
1954 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_inactive
);
1959 vop_reclaim_ap(struct vop_reclaim_args
*ap
)
1963 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_reclaim
);
1968 vop_bmap_ap(struct vop_bmap_args
*ap
)
1972 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_bmap
);
1977 vop_strategy_ap(struct vop_strategy_args
*ap
)
1981 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_strategy
);
1986 vop_print_ap(struct vop_print_args
*ap
)
1990 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_print
);
1995 vop_pathconf_ap(struct vop_pathconf_args
*ap
)
1999 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_pathconf
);
2004 vop_advlock_ap(struct vop_advlock_args
*ap
)
2008 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_advlock
);
2013 vop_balloc_ap(struct vop_balloc_args
*ap
)
2017 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_balloc
);
2022 vop_reallocblks_ap(struct vop_reallocblks_args
*ap
)
2026 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_reallocblks
);
2031 vop_getpages_ap(struct vop_getpages_args
*ap
)
2035 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getpages
);
2040 vop_putpages_ap(struct vop_putpages_args
*ap
)
2044 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_putpages
);
2049 vop_freeblks_ap(struct vop_freeblks_args
*ap
)
2053 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_freeblks
);
2058 vop_getacl_ap(struct vop_getacl_args
*ap
)
2062 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getacl
);
2067 vop_setacl_ap(struct vop_setacl_args
*ap
)
2071 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_setacl
);
2076 vop_aclcheck_ap(struct vop_aclcheck_args
*ap
)
2080 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_aclcheck
);
2085 vop_getextattr_ap(struct vop_getextattr_args
*ap
)
2089 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getextattr
);
2094 vop_setextattr_ap(struct vop_setextattr_args
*ap
)
2098 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_setextattr
);
2103 vop_mountctl_ap(struct vop_mountctl_args
*ap
)
2107 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_mountctl
);
2112 vop_markatime_ap(struct vop_markatime_args
*ap
)
2116 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_markatime
);
2121 vop_allocate_ap(struct vop_allocate_args
*ap
)
2125 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_allocate
);
2130 vop_nresolve_ap(struct vop_nresolve_args
*ap
)
2134 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nresolve
);
2139 vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args
*ap
)
2143 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nlookupdotdot
);
2148 vop_ncreate_ap(struct vop_ncreate_args
*ap
)
2152 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_ncreate
);
2157 vop_nmkdir_ap(struct vop_nmkdir_args
*ap
)
2161 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nmkdir
);
2166 vop_nmknod_ap(struct vop_nmknod_args
*ap
)
2170 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nmknod
);
2175 vop_nlink_ap(struct vop_nlink_args
*ap
)
2179 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nlink
);
2184 vop_nsymlink_ap(struct vop_nsymlink_args
*ap
)
2188 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nsymlink
);
2193 vop_nwhiteout_ap(struct vop_nwhiteout_args
*ap
)
2197 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nwhiteout
);
2202 vop_nremove_ap(struct vop_nremove_args
*ap
)
2206 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nremove
);
2211 vop_nrmdir_ap(struct vop_nrmdir_args
*ap
)
2215 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nrmdir
);
2220 vop_nrename_ap(struct vop_nrename_args
*ap
)
2224 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nrename
);