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/thread2.h>
83 #include <sys/mplock2.h>
85 #define VDESCNAME(name) __CONCAT(__CONCAT(vop_,name),_desc)
87 #define VNODEOP_DESC_INIT(name) \
88 struct syslink_desc VDESCNAME(name) = { \
89 __offsetof(struct vop_ops, __CONCAT(vop_, name)), \
92 VNODEOP_DESC_INIT(default);
93 VNODEOP_DESC_INIT(old_lookup
);
94 VNODEOP_DESC_INIT(old_create
);
95 VNODEOP_DESC_INIT(old_whiteout
);
96 VNODEOP_DESC_INIT(old_mknod
);
97 VNODEOP_DESC_INIT(open
);
98 VNODEOP_DESC_INIT(close
);
99 VNODEOP_DESC_INIT(access
);
100 VNODEOP_DESC_INIT(getattr
);
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(old_remove
);
110 VNODEOP_DESC_INIT(old_link
);
111 VNODEOP_DESC_INIT(old_rename
);
113 VNODEOP_DESC_INIT(old_mkdir
);
114 VNODEOP_DESC_INIT(old_rmdir
);
115 VNODEOP_DESC_INIT(old_symlink
);
116 VNODEOP_DESC_INIT(readdir
);
117 VNODEOP_DESC_INIT(readlink
);
118 VNODEOP_DESC_INIT(inactive
);
119 VNODEOP_DESC_INIT(reclaim
);
120 VNODEOP_DESC_INIT(bmap
);
121 VNODEOP_DESC_INIT(strategy
);
122 VNODEOP_DESC_INIT(print
);
123 VNODEOP_DESC_INIT(pathconf
);
124 VNODEOP_DESC_INIT(advlock
);
125 VNODEOP_DESC_INIT(balloc
);
126 VNODEOP_DESC_INIT(reallocblks
);
127 VNODEOP_DESC_INIT(getpages
);
128 VNODEOP_DESC_INIT(putpages
);
129 VNODEOP_DESC_INIT(freeblks
);
130 VNODEOP_DESC_INIT(getacl
);
131 VNODEOP_DESC_INIT(setacl
);
132 VNODEOP_DESC_INIT(aclcheck
);
133 VNODEOP_DESC_INIT(getextattr
);
134 VNODEOP_DESC_INIT(setextattr
);
135 VNODEOP_DESC_INIT(mountctl
);
136 VNODEOP_DESC_INIT(markatime
);
138 VNODEOP_DESC_INIT(nresolve
);
139 VNODEOP_DESC_INIT(nlookupdotdot
);
140 VNODEOP_DESC_INIT(ncreate
);
141 VNODEOP_DESC_INIT(nmkdir
);
142 VNODEOP_DESC_INIT(nmknod
);
143 VNODEOP_DESC_INIT(nlink
);
144 VNODEOP_DESC_INIT(nsymlink
);
145 VNODEOP_DESC_INIT(nwhiteout
);
146 VNODEOP_DESC_INIT(nremove
);
147 VNODEOP_DESC_INIT(nrmdir
);
148 VNODEOP_DESC_INIT(nrename
);
150 #define DO_OPS(ops, error, ap, vop_field) \
151 error = ops->vop_field(ap)
153 /************************************************************************
154 * PRIMARY HIGH LEVEL VNODE OPERATIONS CALLS *
155 ************************************************************************
157 * These procedures are called directly from the kernel and/or fileops
158 * code to perform file/device operations on the system.
160 * NOTE: The old namespace api functions such as vop_rename() are no
161 * longer available for general use and have been renamed to
162 * vop_old_*(). Only the code in vfs_default.c is allowed to call
165 * NOTE: The VFS_MPLOCK() macro handle mounts which do not set MNTK_MPSAFE.
171 vop_old_lookup(struct vop_ops
*ops
, struct vnode
*dvp
,
172 struct vnode
**vpp
, struct componentname
*cnp
)
174 struct vop_old_lookup_args ap
;
178 ap
.a_head
.a_desc
= &vop_old_lookup_desc
;
179 ap
.a_head
.a_ops
= ops
;
183 VFS_MPLOCK(dvp
->v_mount
);
184 DO_OPS(ops
, error
, &ap
, vop_old_lookup
);
185 VFS_MPUNLOCK(dvp
->v_mount
);
193 vop_old_create(struct vop_ops
*ops
, struct vnode
*dvp
,
194 struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
196 struct vop_old_create_args ap
;
200 ap
.a_head
.a_desc
= &vop_old_create_desc
;
201 ap
.a_head
.a_ops
= ops
;
207 VFS_MPLOCK(dvp
->v_mount
);
208 DO_OPS(ops
, error
, &ap
, vop_old_create
);
209 VFS_MPUNLOCK(dvp
->v_mount
);
217 vop_old_whiteout(struct vop_ops
*ops
, struct vnode
*dvp
,
218 struct componentname
*cnp
, int flags
)
220 struct vop_old_whiteout_args ap
;
224 ap
.a_head
.a_desc
= &vop_old_whiteout_desc
;
225 ap
.a_head
.a_ops
= ops
;
230 VFS_MPLOCK(dvp
->v_mount
);
231 DO_OPS(ops
, error
, &ap
, vop_old_whiteout
);
232 VFS_MPUNLOCK(dvp
->v_mount
);
240 vop_old_mknod(struct vop_ops
*ops
, struct vnode
*dvp
,
241 struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
243 struct vop_old_mknod_args ap
;
247 ap
.a_head
.a_desc
= &vop_old_mknod_desc
;
248 ap
.a_head
.a_ops
= ops
;
254 VFS_MPLOCK(dvp
->v_mount
);
255 DO_OPS(ops
, error
, &ap
, vop_old_mknod
);
256 VFS_MPUNLOCK(dvp
->v_mount
);
261 * NOTE: VAGE is always cleared when calling VOP_OPEN().
264 vop_open(struct vop_ops
*ops
, struct vnode
*vp
, int mode
, struct ucred
*cred
,
267 struct vop_open_args ap
;
272 * Decrement 3-2-1-0. Does not decrement beyond 0
274 if (vp
->v_flag
& VAGE0
) {
275 vclrflags(vp
, VAGE0
);
276 } else if (vp
->v_flag
& VAGE1
) {
277 vclrflags(vp
, VAGE1
);
278 vsetflags(vp
, VAGE0
);
281 ap
.a_head
.a_desc
= &vop_open_desc
;
282 ap
.a_head
.a_ops
= ops
;
288 VFS_MPLOCK(vp
->v_mount
);
289 DO_OPS(ops
, error
, &ap
, vop_open
);
290 VFS_MPUNLOCK(vp
->v_mount
);
298 vop_close(struct vop_ops
*ops
, struct vnode
*vp
, int fflag
,
301 struct vop_close_args ap
;
305 ap
.a_head
.a_desc
= &vop_close_desc
;
306 ap
.a_head
.a_ops
= ops
;
311 VFS_MPLOCK(vp
->v_mount
);
312 DO_OPS(ops
, error
, &ap
, vop_close
);
313 VFS_MPUNLOCK(vp
->v_mount
);
321 vop_access(struct vop_ops
*ops
, struct vnode
*vp
, int mode
, int flags
,
324 struct vop_access_args ap
;
328 ap
.a_head
.a_desc
= &vop_access_desc
;
329 ap
.a_head
.a_ops
= ops
;
335 VFS_MPLOCK(vp
->v_mount
);
336 DO_OPS(ops
, error
, &ap
, vop_access
);
337 VFS_MPUNLOCK(vp
->v_mount
);
345 vop_getattr(struct vop_ops
*ops
, struct vnode
*vp
, struct vattr
*vap
)
347 struct vop_getattr_args ap
;
351 ap
.a_head
.a_desc
= &vop_getattr_desc
;
352 ap
.a_head
.a_ops
= ops
;
356 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_GA_MPSAFE
);
357 DO_OPS(ops
, error
, &ap
, vop_getattr
);
358 VFS_MPUNLOCK(vp
->v_mount
);
367 vop_setattr(struct vop_ops
*ops
, struct vnode
*vp
, struct vattr
*vap
,
370 struct vop_setattr_args ap
;
374 ap
.a_head
.a_desc
= &vop_setattr_desc
;
375 ap
.a_head
.a_ops
= ops
;
380 VFS_MPLOCK(vp
->v_mount
);
381 DO_OPS(ops
, error
, &ap
, vop_setattr
);
382 VFS_MPUNLOCK(vp
->v_mount
);
390 vop_read(struct vop_ops
*ops
, struct vnode
*vp
, struct uio
*uio
, int ioflag
,
393 struct vop_read_args ap
;
397 ap
.a_head
.a_desc
= &vop_read_desc
;
398 ap
.a_head
.a_ops
= ops
;
401 ap
.a_ioflag
= ioflag
;
404 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_RD_MPSAFE
);
405 DO_OPS(ops
, error
, &ap
, vop_read
);
406 VFS_MPUNLOCK(vp
->v_mount
);
414 vop_write(struct vop_ops
*ops
, struct vnode
*vp
, struct uio
*uio
, int ioflag
,
417 struct vop_write_args ap
;
419 int error
, do_accounting
= 0;
421 uint64_t size_before
=0, size_after
=0;
423 uint64_t offset
, delta
;
425 ap
.a_head
.a_desc
= &vop_write_desc
;
426 ap
.a_head
.a_ops
= ops
;
429 ap
.a_ioflag
= ioflag
;
432 /* is this a regular vnode ? */
433 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_WR_MPSAFE
);
434 if (vfs_quota_enabled
&& (vp
->v_type
== VREG
)) {
435 if ((error
= VOP_GETATTR(vp
, &va
)) != 0)
437 size_before
= va
.va_size
;
438 /* this file may already have been removed */
442 offset
= uio
->uio_offset
;
443 if (ioflag
& IO_APPEND
)
444 offset
= size_before
;
445 size_after
= offset
+ uio
->uio_resid
;
446 if (size_after
< size_before
)
447 size_after
= size_before
;
448 delta
= size_after
- size_before
;
451 if (!vq_write_ok(mp
, va
.va_uid
, va
.va_gid
, delta
)) {
456 DO_OPS(ops
, error
, &ap
, vop_write
);
457 if ((error
== 0) && do_accounting
) {
458 VFS_ACCOUNT(mp
, va
.va_uid
, va
.va_gid
, size_after
- size_before
);
461 VFS_MPUNLOCK(vp
->v_mount
);
469 vop_ioctl(struct vop_ops
*ops
, struct vnode
*vp
, u_long command
, caddr_t data
,
470 int fflag
, struct ucred
*cred
, struct sysmsg
*msg
)
472 struct vop_ioctl_args ap
;
476 ap
.a_head
.a_desc
= &vop_ioctl_desc
;
477 ap
.a_head
.a_ops
= ops
;
479 ap
.a_command
= command
;
485 VFS_MPLOCK(vp
->v_mount
);
486 DO_OPS(ops
, error
, &ap
, vop_ioctl
);
487 VFS_MPUNLOCK(vp
->v_mount
);
495 vop_poll(struct vop_ops
*ops
, struct vnode
*vp
, int events
, struct ucred
*cred
)
497 struct vop_poll_args ap
;
501 ap
.a_head
.a_desc
= &vop_poll_desc
;
502 ap
.a_head
.a_ops
= ops
;
504 ap
.a_events
= events
;
507 VFS_MPLOCK(vp
->v_mount
);
508 DO_OPS(ops
, error
, &ap
, vop_poll
);
509 VFS_MPUNLOCK(vp
->v_mount
);
517 vop_kqfilter(struct vop_ops
*ops
, struct vnode
*vp
, struct knote
*kn
)
519 struct vop_kqfilter_args ap
;
523 ap
.a_head
.a_desc
= &vop_kqfilter_desc
;
524 ap
.a_head
.a_ops
= ops
;
528 VFS_MPLOCK(vp
->v_mount
);
529 DO_OPS(ops
, error
, &ap
, vop_kqfilter
);
530 VFS_MPUNLOCK(vp
->v_mount
);
538 vop_mmap(struct vop_ops
*ops
, struct vnode
*vp
, int fflags
, struct ucred
*cred
)
540 struct vop_mmap_args ap
;
544 ap
.a_head
.a_desc
= &vop_mmap_desc
;
545 ap
.a_head
.a_ops
= ops
;
547 ap
.a_fflags
= fflags
;
550 VFS_MPLOCK(vp
->v_mount
);
551 DO_OPS(ops
, error
, &ap
, vop_mmap
);
552 VFS_MPUNLOCK(vp
->v_mount
);
560 vop_fsync(struct vop_ops
*ops
, struct vnode
*vp
, int waitfor
, int flags
)
562 struct vop_fsync_args ap
;
566 ap
.a_head
.a_desc
= &vop_fsync_desc
;
567 ap
.a_head
.a_ops
= ops
;
569 ap
.a_waitfor
= waitfor
;
572 VFS_MPLOCK(vp
->v_mount
);
573 DO_OPS(ops
, error
, &ap
, vop_fsync
);
574 VFS_MPUNLOCK(vp
->v_mount
);
582 vop_old_remove(struct vop_ops
*ops
, struct vnode
*dvp
,
583 struct vnode
*vp
, struct componentname
*cnp
)
585 struct vop_old_remove_args ap
;
589 ap
.a_head
.a_desc
= &vop_old_remove_desc
;
590 ap
.a_head
.a_ops
= ops
;
595 VFS_MPLOCK(dvp
->v_mount
);
596 DO_OPS(ops
, error
, &ap
, vop_old_remove
);
597 VFS_MPUNLOCK(dvp
->v_mount
);
605 vop_old_link(struct vop_ops
*ops
, struct vnode
*tdvp
,
606 struct vnode
*vp
, struct componentname
*cnp
)
608 struct vop_old_link_args ap
;
612 ap
.a_head
.a_desc
= &vop_old_link_desc
;
613 ap
.a_head
.a_ops
= ops
;
618 VFS_MPLOCK(tdvp
->v_mount
);
619 DO_OPS(ops
, error
, &ap
, vop_old_link
);
620 VFS_MPUNLOCK(tdvp
->v_mount
);
628 vop_old_rename(struct vop_ops
*ops
,
629 struct vnode
*fdvp
, struct vnode
*fvp
, struct componentname
*fcnp
,
630 struct vnode
*tdvp
, struct vnode
*tvp
, struct componentname
*tcnp
)
632 struct vop_old_rename_args ap
;
636 ap
.a_head
.a_desc
= &vop_old_rename_desc
;
637 ap
.a_head
.a_ops
= ops
;
645 VFS_MPLOCK(tdvp
->v_mount
);
646 DO_OPS(ops
, error
, &ap
, vop_old_rename
);
647 VFS_MPUNLOCK(tdvp
->v_mount
);
655 vop_old_mkdir(struct vop_ops
*ops
, struct vnode
*dvp
,
656 struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
658 struct vop_old_mkdir_args ap
;
662 ap
.a_head
.a_desc
= &vop_old_mkdir_desc
;
663 ap
.a_head
.a_ops
= ops
;
669 VFS_MPLOCK(dvp
->v_mount
);
670 DO_OPS(ops
, error
, &ap
, vop_old_mkdir
);
671 VFS_MPUNLOCK(dvp
->v_mount
);
679 vop_old_rmdir(struct vop_ops
*ops
, struct vnode
*dvp
,
680 struct vnode
*vp
, struct componentname
*cnp
)
682 struct vop_old_rmdir_args ap
;
686 ap
.a_head
.a_desc
= &vop_old_rmdir_desc
;
687 ap
.a_head
.a_ops
= ops
;
692 VFS_MPLOCK(dvp
->v_mount
);
693 DO_OPS(ops
, error
, &ap
, vop_old_rmdir
);
694 VFS_MPUNLOCK(dvp
->v_mount
);
702 vop_old_symlink(struct vop_ops
*ops
, struct vnode
*dvp
,
703 struct vnode
**vpp
, struct componentname
*cnp
,
704 struct vattr
*vap
, char *target
)
706 struct vop_old_symlink_args ap
;
710 ap
.a_head
.a_desc
= &vop_old_symlink_desc
;
711 ap
.a_head
.a_ops
= ops
;
716 ap
.a_target
= target
;
718 VFS_MPLOCK(dvp
->v_mount
);
719 DO_OPS(ops
, error
, &ap
, vop_old_symlink
);
720 VFS_MPUNLOCK(dvp
->v_mount
);
728 vop_readdir(struct vop_ops
*ops
, struct vnode
*vp
, struct uio
*uio
,
729 struct ucred
*cred
, int *eofflag
, int *ncookies
, off_t
**cookies
)
731 struct vop_readdir_args ap
;
735 ap
.a_head
.a_desc
= &vop_readdir_desc
;
736 ap
.a_head
.a_ops
= ops
;
740 ap
.a_eofflag
= eofflag
;
741 ap
.a_ncookies
= ncookies
;
742 ap
.a_cookies
= cookies
;
744 VFS_MPLOCK(vp
->v_mount
);
745 DO_OPS(ops
, error
, &ap
, vop_readdir
);
746 VFS_MPUNLOCK(vp
->v_mount
);
754 vop_readlink(struct vop_ops
*ops
, struct vnode
*vp
, struct uio
*uio
,
757 struct vop_readlink_args ap
;
761 ap
.a_head
.a_desc
= &vop_readlink_desc
;
762 ap
.a_head
.a_ops
= ops
;
767 VFS_MPLOCK(vp
->v_mount
);
768 DO_OPS(ops
, error
, &ap
, vop_readlink
);
769 VFS_MPUNLOCK(vp
->v_mount
);
777 vop_inactive(struct vop_ops
*ops
, struct vnode
*vp
)
779 struct vop_inactive_args ap
;
784 ap
.a_head
.a_desc
= &vop_inactive_desc
;
785 ap
.a_head
.a_ops
= ops
;
789 * WARNING! Deactivation of the vnode can cause it to be recycled,
790 * clearing vp->v_mount.
793 VFS_MPLOCK_FLAG(mp
, MNTK_IN_MPSAFE
);
794 DO_OPS(ops
, error
, &ap
, vop_inactive
);
803 vop_reclaim(struct vop_ops
*ops
, struct vnode
*vp
)
805 struct vop_reclaim_args ap
;
810 ap
.a_head
.a_desc
= &vop_reclaim_desc
;
811 ap
.a_head
.a_ops
= ops
;
815 * WARNING! Reclamation of the vnode will clear vp->v_mount.
819 DO_OPS(ops
, error
, &ap
, vop_reclaim
);
828 vop_bmap(struct vop_ops
*ops
, struct vnode
*vp
, off_t loffset
,
829 off_t
*doffsetp
, int *runp
, int *runb
, buf_cmd_t cmd
)
831 struct vop_bmap_args ap
;
835 ap
.a_head
.a_desc
= &vop_bmap_desc
;
836 ap
.a_head
.a_ops
= ops
;
838 ap
.a_loffset
= loffset
;
839 ap
.a_doffsetp
= doffsetp
;
844 VFS_MPLOCK(vp
->v_mount
);
845 DO_OPS(ops
, error
, &ap
, vop_bmap
);
846 VFS_MPUNLOCK(vp
->v_mount
);
854 vop_strategy(struct vop_ops
*ops
, struct vnode
*vp
, struct bio
*bio
)
856 struct vop_strategy_args ap
;
860 ap
.a_head
.a_desc
= &vop_strategy_desc
;
861 ap
.a_head
.a_ops
= ops
;
866 VFS_MPLOCK_FLAG(vp
->v_mount
, MNTK_SG_MPSAFE
);
867 DO_OPS(ops
, error
, &ap
, vop_strategy
);
868 VFS_MPUNLOCK(vp
->v_mount
);
870 /* ugly hack for swap */
872 DO_OPS(ops
, error
, &ap
, vop_strategy
);
882 vop_print(struct vop_ops
*ops
, struct vnode
*vp
)
884 struct vop_print_args ap
;
888 ap
.a_head
.a_desc
= &vop_print_desc
;
889 ap
.a_head
.a_ops
= ops
;
892 VFS_MPLOCK(vp
->v_mount
);
893 DO_OPS(ops
, error
, &ap
, vop_print
);
894 VFS_MPUNLOCK(vp
->v_mount
);
902 vop_pathconf(struct vop_ops
*ops
, struct vnode
*vp
, int name
,
905 struct vop_pathconf_args ap
;
909 ap
.a_head
.a_desc
= &vop_pathconf_desc
;
910 ap
.a_head
.a_ops
= ops
;
913 ap
.a_retval
= retval
;
915 VFS_MPLOCK(vp
->v_mount
);
916 DO_OPS(ops
, error
, &ap
, vop_pathconf
);
917 VFS_MPUNLOCK(vp
->v_mount
);
925 vop_advlock(struct vop_ops
*ops
, struct vnode
*vp
, caddr_t id
, int op
,
926 struct flock
*fl
, int flags
)
928 struct vop_advlock_args ap
;
932 ap
.a_head
.a_desc
= &vop_advlock_desc
;
933 ap
.a_head
.a_ops
= ops
;
940 VFS_MPLOCK(vp
->v_mount
);
941 DO_OPS(ops
, error
, &ap
, vop_advlock
);
942 VFS_MPUNLOCK(vp
->v_mount
);
950 vop_balloc(struct vop_ops
*ops
, struct vnode
*vp
, off_t startoffset
,
951 int size
, struct ucred
*cred
, int flags
,
954 struct vop_balloc_args ap
;
958 ap
.a_head
.a_desc
= &vop_balloc_desc
;
959 ap
.a_head
.a_ops
= ops
;
961 ap
.a_startoffset
= startoffset
;
967 VFS_MPLOCK(vp
->v_mount
);
968 DO_OPS(ops
, error
, &ap
, vop_balloc
);
969 VFS_MPUNLOCK(vp
->v_mount
);
977 vop_reallocblks(struct vop_ops
*ops
, struct vnode
*vp
,
978 struct cluster_save
*buflist
)
980 struct vop_reallocblks_args ap
;
984 ap
.a_head
.a_desc
= &vop_reallocblks_desc
;
985 ap
.a_head
.a_ops
= ops
;
987 ap
.a_buflist
= buflist
;
989 VFS_MPLOCK(vp
->v_mount
);
990 DO_OPS(ops
, error
, &ap
, vop_reallocblks
);
991 VFS_MPUNLOCK(vp
->v_mount
);
999 vop_getpages(struct vop_ops
*ops
, struct vnode
*vp
, vm_page_t
*m
, int count
,
1000 int reqpage
, vm_ooffset_t offset
, int seqaccess
)
1002 struct vop_getpages_args ap
;
1006 ap
.a_head
.a_desc
= &vop_getpages_desc
;
1007 ap
.a_head
.a_ops
= ops
;
1011 ap
.a_reqpage
= reqpage
;
1012 ap
.a_offset
= offset
;
1013 ap
.a_seqaccess
= seqaccess
;
1015 VFS_MPLOCK(vp
->v_mount
);
1016 DO_OPS(ops
, error
, &ap
, vop_getpages
);
1017 VFS_MPUNLOCK(vp
->v_mount
);
1025 vop_putpages(struct vop_ops
*ops
, struct vnode
*vp
, vm_page_t
*m
, int count
,
1026 int sync
, int *rtvals
, vm_ooffset_t offset
)
1028 struct vop_putpages_args ap
;
1032 ap
.a_head
.a_desc
= &vop_putpages_desc
;
1033 ap
.a_head
.a_ops
= ops
;
1038 ap
.a_rtvals
= rtvals
;
1039 ap
.a_offset
= offset
;
1041 VFS_MPLOCK(vp
->v_mount
);
1042 DO_OPS(ops
, error
, &ap
, vop_putpages
);
1043 VFS_MPUNLOCK(vp
->v_mount
);
1051 vop_freeblks(struct vop_ops
*ops
, struct vnode
*vp
, off_t offset
, int length
)
1053 struct vop_freeblks_args ap
;
1057 ap
.a_head
.a_desc
= &vop_freeblks_desc
;
1058 ap
.a_head
.a_ops
= ops
;
1060 ap
.a_offset
= offset
;
1061 ap
.a_length
= length
;
1063 VFS_MPLOCK(vp
->v_mount
);
1064 DO_OPS(ops
, error
, &ap
, vop_freeblks
);
1065 VFS_MPUNLOCK(vp
->v_mount
);
1073 vop_getacl(struct vop_ops
*ops
, struct vnode
*vp
, acl_type_t type
,
1074 struct acl
*aclp
, struct ucred
*cred
)
1076 struct vop_getacl_args ap
;
1080 ap
.a_head
.a_desc
= &vop_getacl_desc
;
1081 ap
.a_head
.a_ops
= ops
;
1087 VFS_MPLOCK(vp
->v_mount
);
1088 DO_OPS(ops
, error
, &ap
, vop_getacl
);
1089 VFS_MPUNLOCK(vp
->v_mount
);
1097 vop_setacl(struct vop_ops
*ops
, struct vnode
*vp
, acl_type_t type
,
1098 struct acl
*aclp
, struct ucred
*cred
)
1100 struct vop_setacl_args ap
;
1104 ap
.a_head
.a_desc
= &vop_setacl_desc
;
1105 ap
.a_head
.a_ops
= ops
;
1111 VFS_MPLOCK(vp
->v_mount
);
1112 DO_OPS(ops
, error
, &ap
, vop_setacl
);
1113 VFS_MPUNLOCK(vp
->v_mount
);
1121 vop_aclcheck(struct vop_ops
*ops
, struct vnode
*vp
, acl_type_t type
,
1122 struct acl
*aclp
, struct ucred
*cred
)
1124 struct vop_aclcheck_args ap
;
1128 ap
.a_head
.a_desc
= &vop_aclcheck_desc
;
1129 ap
.a_head
.a_ops
= ops
;
1135 VFS_MPLOCK(vp
->v_mount
);
1136 DO_OPS(ops
, error
, &ap
, vop_aclcheck
);
1137 VFS_MPUNLOCK(vp
->v_mount
);
1145 vop_getextattr(struct vop_ops
*ops
, struct vnode
*vp
, int attrnamespace
,
1146 char *attrname
, struct uio
*uio
, struct ucred
*cred
)
1148 struct vop_getextattr_args ap
;
1152 ap
.a_head
.a_desc
= &vop_getextattr_desc
;
1153 ap
.a_head
.a_ops
= ops
;
1155 ap
.a_attrnamespace
= attrnamespace
;
1156 ap
.a_attrname
= attrname
;
1160 VFS_MPLOCK(vp
->v_mount
);
1161 DO_OPS(ops
, error
, &ap
, vop_getextattr
);
1162 VFS_MPUNLOCK(vp
->v_mount
);
1170 vop_setextattr(struct vop_ops
*ops
, struct vnode
*vp
, int attrnamespace
,
1171 char *attrname
, struct uio
*uio
, struct ucred
*cred
)
1173 struct vop_setextattr_args ap
;
1177 ap
.a_head
.a_desc
= &vop_setextattr_desc
;
1178 ap
.a_head
.a_ops
= ops
;
1180 ap
.a_attrnamespace
= attrnamespace
;
1181 ap
.a_attrname
= attrname
;
1185 VFS_MPLOCK(vp
->v_mount
);
1186 DO_OPS(ops
, error
, &ap
, vop_setextattr
);
1187 VFS_MPUNLOCK(vp
->v_mount
);
1195 vop_mountctl(struct vop_ops
*ops
, struct vnode
*vp
, int op
, struct file
*fp
,
1196 const void *ctl
, int ctllen
, void *buf
, int buflen
, int *res
)
1198 struct vop_mountctl_args ap
;
1202 ap
.a_head
.a_desc
= &vop_mountctl_desc
;
1203 ap
.a_head
.a_ops
= ops
;
1207 ap
.a_ctllen
= ctllen
;
1209 ap
.a_buflen
= buflen
;
1212 VFS_MPLOCK(vp
->v_mount
);
1213 DO_OPS(ops
, error
, &ap
, vop_mountctl
);
1214 VFS_MPUNLOCK(vp
->v_mount
);
1222 vop_markatime(struct vop_ops
*ops
, struct vnode
*vp
, struct ucred
*cred
)
1224 struct vop_markatime_args ap
;
1228 ap
.a_head
.a_desc
= &vop_markatime_desc
;
1229 ap
.a_head
.a_ops
= ops
;
1233 VFS_MPLOCK(vp
->v_mount
);
1234 DO_OPS(ops
, error
, &ap
, vop_markatime
);
1235 VFS_MPUNLOCK(vp
->v_mount
);
1242 * nresolve takes a locked ncp, a referenced but unlocked dvp, and a cred,
1243 * and resolves the ncp into a positive or negative hit.
1245 * The namecache is automatically adjusted by this function. The ncp
1246 * is left locked on return.
1251 vop_nresolve(struct vop_ops
*ops
, struct nchandle
*nch
,
1252 struct vnode
*dvp
, struct ucred
*cred
)
1254 struct vop_nresolve_args ap
;
1258 ap
.a_head
.a_desc
= &vop_nresolve_desc
;
1259 ap
.a_head
.a_ops
= ops
;
1264 VFS_MPLOCK(dvp
->v_mount
);
1265 DO_OPS(ops
, error
, &ap
, vop_nresolve
);
1266 VFS_MPUNLOCK(dvp
->v_mount
);
1271 * nlookupdotdot takes an unlocked directory, referenced dvp, and looks
1272 * up "..", returning a locked parent directory in *vpp. If an error
1273 * occurs *vpp will be NULL.
1278 vop_nlookupdotdot(struct vop_ops
*ops
, struct vnode
*dvp
,
1279 struct vnode
**vpp
, struct ucred
*cred
, char **fakename
)
1281 struct vop_nlookupdotdot_args ap
;
1285 ap
.a_head
.a_desc
= &vop_nlookupdotdot_desc
;
1286 ap
.a_head
.a_ops
= ops
;
1290 ap
.a_fakename
= fakename
;
1292 VFS_MPLOCK(dvp
->v_mount
);
1293 DO_OPS(ops
, error
, &ap
, vop_nlookupdotdot
);
1294 VFS_MPUNLOCK(dvp
->v_mount
);
1299 * ncreate takes a locked, resolved ncp that typically represents a negative
1300 * cache hit and creates the file or node specified by the ncp, cred, and
1301 * vattr. If no error occurs a locked vnode is returned in *vpp.
1303 * The dvp passed in is referenced but unlocked.
1305 * The namecache is automatically adjusted by this function. The ncp
1306 * is left locked on return.
1311 vop_ncreate(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1312 struct vnode
**vpp
, struct ucred
*cred
, struct vattr
*vap
)
1314 struct vop_ncreate_args ap
;
1318 ap
.a_head
.a_desc
= &vop_ncreate_desc
;
1319 ap
.a_head
.a_ops
= ops
;
1326 VFS_MPLOCK(dvp
->v_mount
);
1327 DO_OPS(ops
, error
, &ap
, vop_ncreate
);
1328 VFS_MPUNLOCK(dvp
->v_mount
);
1333 * nmkdir takes a locked, resolved ncp that typically represents a negative
1334 * cache hit and creates the directory specified by the ncp, cred, and
1335 * vattr. If no error occurs a locked vnode is returned in *vpp.
1337 * The dvp passed in is referenced but unlocked.
1339 * The namecache is automatically adjusted by this function. The ncp
1340 * is left locked on return.
1345 vop_nmkdir(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1346 struct vnode
**vpp
, struct ucred
*cred
, struct vattr
*vap
)
1348 struct vop_nmkdir_args ap
;
1352 ap
.a_head
.a_desc
= &vop_nmkdir_desc
;
1353 ap
.a_head
.a_ops
= ops
;
1360 VFS_MPLOCK(dvp
->v_mount
);
1361 DO_OPS(ops
, error
, &ap
, vop_nmkdir
);
1362 VFS_MPUNLOCK(dvp
->v_mount
);
1367 * nmknod takes a locked, resolved ncp that typically represents a negative
1368 * cache hit and creates the node specified by the ncp, cred, and
1369 * vattr. If no error occurs a locked vnode is returned in *vpp.
1371 * The dvp passed in is referenced but unlocked.
1373 * The namecache is automatically adjusted by this function. The ncp
1374 * is left locked on return.
1379 vop_nmknod(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1380 struct vnode
**vpp
, struct ucred
*cred
, struct vattr
*vap
)
1382 struct vop_nmknod_args ap
;
1386 ap
.a_head
.a_desc
= &vop_nmknod_desc
;
1387 ap
.a_head
.a_ops
= ops
;
1394 VFS_MPLOCK(dvp
->v_mount
);
1395 DO_OPS(ops
, error
, &ap
, vop_nmknod
);
1396 VFS_MPUNLOCK(dvp
->v_mount
);
1401 * nlink takes a locked, resolved ncp that typically represents a negative
1402 * cache hit and creates the node specified by the ncp, cred, and
1403 * existing vnode. The passed vp must be locked and will remain locked
1404 * on return, as does the ncp, whether an error occurs or not.
1406 * The dvp passed in is referenced but unlocked.
1408 * The namecache is automatically adjusted by this function. The ncp
1409 * is left locked on return.
1414 vop_nlink(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1415 struct vnode
*vp
, struct ucred
*cred
)
1417 struct vop_nlink_args ap
;
1421 ap
.a_head
.a_desc
= &vop_nlink_desc
;
1422 ap
.a_head
.a_ops
= ops
;
1428 VFS_MPLOCK(dvp
->v_mount
);
1429 DO_OPS(ops
, error
, &ap
, vop_nlink
);
1430 VFS_MPUNLOCK(dvp
->v_mount
);
1435 * nsymlink takes a locked, resolved ncp that typically represents a negative
1436 * cache hit and creates a symbolic link based on cred, vap, and target (the
1437 * contents of the link). If no error occurs a locked vnode is returned in
1440 * The dvp passed in is referenced but unlocked.
1442 * The namecache is automatically adjusted by this function. The ncp
1443 * is left locked on return.
1448 vop_nsymlink(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1449 struct vnode
**vpp
, struct ucred
*cred
,
1450 struct vattr
*vap
, char *target
)
1452 struct vop_nsymlink_args ap
;
1456 ap
.a_head
.a_desc
= &vop_nsymlink_desc
;
1457 ap
.a_head
.a_ops
= ops
;
1463 ap
.a_target
= target
;
1465 VFS_MPLOCK(dvp
->v_mount
);
1466 DO_OPS(ops
, error
, &ap
, vop_nsymlink
);
1467 VFS_MPUNLOCK(dvp
->v_mount
);
1472 * nwhiteout takes a locked, resolved ncp that can represent a positive or
1473 * negative hit and executes the whiteout function specified in flags.
1475 * The dvp passed in is referenced but unlocked.
1477 * The namecache is automatically adjusted by this function. The ncp
1478 * is left locked on return.
1483 vop_nwhiteout(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1484 struct ucred
*cred
, int flags
)
1486 struct vop_nwhiteout_args ap
;
1490 ap
.a_head
.a_desc
= &vop_nwhiteout_desc
;
1491 ap
.a_head
.a_ops
= ops
;
1497 VFS_MPLOCK(dvp
->v_mount
);
1498 DO_OPS(ops
, error
, &ap
, vop_nwhiteout
);
1499 VFS_MPUNLOCK(dvp
->v_mount
);
1504 * nremove takes a locked, resolved ncp that generally represents a
1505 * positive hit and removes the file.
1507 * The dvp passed in is referenced but unlocked.
1509 * The namecache is automatically adjusted by this function. The ncp
1510 * is left locked on return.
1515 vop_nremove(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1518 struct vop_nremove_args ap
;
1523 ap
.a_head
.a_desc
= &vop_nremove_desc
;
1524 ap
.a_head
.a_ops
= ops
;
1529 if ((error
= VOP_GETATTR(nch
->ncp
->nc_vp
, &va
)) != 0)
1532 VFS_MPLOCK(dvp
->v_mount
);
1533 DO_OPS(ops
, error
, &ap
, vop_nremove
);
1534 /* Only update space counters if this is the last hard link */
1535 if ((error
== 0) && (va
.va_nlink
== 1)) {
1536 VFS_ACCOUNT(nch
->mount
, va
.va_uid
, va
.va_gid
, -va
.va_size
);
1538 VFS_MPUNLOCK(dvp
->v_mount
);
1543 * nrmdir takes a locked, resolved ncp that generally represents a
1544 * directory and removes the directory.
1546 * The dvp passed in is referenced but unlocked.
1548 * The namecache is automatically adjusted by this function. The ncp
1549 * is left locked on return.
1554 vop_nrmdir(struct vop_ops
*ops
, struct nchandle
*nch
, struct vnode
*dvp
,
1557 struct vop_nrmdir_args ap
;
1561 ap
.a_head
.a_desc
= &vop_nrmdir_desc
;
1562 ap
.a_head
.a_ops
= ops
;
1567 VFS_MPLOCK(dvp
->v_mount
);
1568 DO_OPS(ops
, error
, &ap
, vop_nrmdir
);
1569 VFS_MPUNLOCK(dvp
->v_mount
);
1574 * nrename takes TWO locked, resolved ncp's and the cred of the caller
1575 * and renames the source ncp to the target ncp. The target ncp may
1576 * represent a positive or negative hit.
1578 * The fdvp and tdvp passed in are referenced but unlocked.
1580 * The namecache is automatically adjusted by this function. The ncp
1581 * is left locked on return. The source ncp is typically changed to
1582 * a negative cache hit and the target ncp typically takes on the
1583 * source ncp's underlying file.
1588 vop_nrename(struct vop_ops
*ops
,
1589 struct nchandle
*fnch
, struct nchandle
*tnch
,
1590 struct vnode
*fdvp
, struct vnode
*tdvp
,
1593 struct vop_nrename_args ap
;
1597 ap
.a_head
.a_desc
= &vop_nrename_desc
;
1598 ap
.a_head
.a_ops
= ops
;
1605 VFS_MPLOCK(fdvp
->v_mount
);
1606 DO_OPS(ops
, error
, &ap
, vop_nrename
);
1607 VFS_MPUNLOCK(fdvp
->v_mount
);
1611 /************************************************************************
1612 * PRIMARY VNODE OPERATIONS FORWARDING CALLS *
1613 ************************************************************************
1615 * These procedures are called from VFSs such as nullfs
1616 * when they wish to forward an operation on one VFS to another. The
1617 * argument structure/message is modified and then directly passed to the
1618 * appropriate routine. This routines may also be called by initiators
1619 * who have an argument structure in hand rather then discreet arguments.
1621 * MPSAFE - Caller expected to already hold the appropriate vfs lock.
1624 vop_vnoperate_ap(struct vop_generic_args
*ap
)
1626 struct vop_ops
*ops
;
1630 error
= VOCALL(ops
, ap
);
1636 * This routine is called by the cache coherency layer to execute the actual
1637 * VFS operation. If a journaling layer is present we call though it, else
1638 * we call the native VOP functions.
1641 vop_cache_operate_ap(struct vop_generic_args
*ap
)
1643 struct vop_ops
*ops
;
1647 if (ops
->head
.vv_mount
->mnt_vn_journal_ops
)
1648 error
= VOCALL(ops
->head
.vv_mount
->mnt_vn_journal_ops
, ap
);
1650 error
= VOCALL(ops
->head
.vv_mount
->mnt_vn_norm_ops
, ap
);
1656 * This routine is called by the journaling layer to execute the actual
1660 vop_journal_operate_ap(struct vop_generic_args
*ap
)
1662 struct vop_ops
*ops
;
1666 error
= VOCALL(ops
->head
.vv_mount
->mnt_vn_norm_ops
, ap
);
1672 vop_open_ap(struct vop_open_args
*ap
)
1676 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_open
);
1681 vop_close_ap(struct vop_close_args
*ap
)
1685 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_close
);
1690 vop_access_ap(struct vop_access_args
*ap
)
1694 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_access
);
1699 vop_getattr_ap(struct vop_getattr_args
*ap
)
1703 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getattr
);
1708 vop_setattr_ap(struct vop_setattr_args
*ap
)
1712 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_setattr
);
1717 vop_read_ap(struct vop_read_args
*ap
)
1721 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_read
);
1726 vop_write_ap(struct vop_write_args
*ap
)
1730 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_write
);
1735 vop_ioctl_ap(struct vop_ioctl_args
*ap
)
1739 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_ioctl
);
1744 vop_poll_ap(struct vop_poll_args
*ap
)
1748 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_poll
);
1753 vop_kqfilter_ap(struct vop_kqfilter_args
*ap
)
1757 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_kqfilter
);
1762 vop_mmap_ap(struct vop_mmap_args
*ap
)
1766 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_mmap
);
1771 vop_fsync_ap(struct vop_fsync_args
*ap
)
1775 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_fsync
);
1780 vop_readdir_ap(struct vop_readdir_args
*ap
)
1784 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_readdir
);
1789 vop_readlink_ap(struct vop_readlink_args
*ap
)
1793 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_readlink
);
1798 vop_inactive_ap(struct vop_inactive_args
*ap
)
1802 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_inactive
);
1807 vop_reclaim_ap(struct vop_reclaim_args
*ap
)
1811 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_reclaim
);
1816 vop_bmap_ap(struct vop_bmap_args
*ap
)
1820 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_bmap
);
1825 vop_strategy_ap(struct vop_strategy_args
*ap
)
1829 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_strategy
);
1834 vop_print_ap(struct vop_print_args
*ap
)
1838 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_print
);
1843 vop_pathconf_ap(struct vop_pathconf_args
*ap
)
1847 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_pathconf
);
1852 vop_advlock_ap(struct vop_advlock_args
*ap
)
1856 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_advlock
);
1861 vop_balloc_ap(struct vop_balloc_args
*ap
)
1865 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_balloc
);
1870 vop_reallocblks_ap(struct vop_reallocblks_args
*ap
)
1874 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_reallocblks
);
1879 vop_getpages_ap(struct vop_getpages_args
*ap
)
1883 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getpages
);
1888 vop_putpages_ap(struct vop_putpages_args
*ap
)
1892 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_putpages
);
1897 vop_freeblks_ap(struct vop_freeblks_args
*ap
)
1901 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_freeblks
);
1906 vop_getacl_ap(struct vop_getacl_args
*ap
)
1910 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getacl
);
1915 vop_setacl_ap(struct vop_setacl_args
*ap
)
1919 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_setacl
);
1924 vop_aclcheck_ap(struct vop_aclcheck_args
*ap
)
1928 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_aclcheck
);
1933 vop_getextattr_ap(struct vop_getextattr_args
*ap
)
1937 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_getextattr
);
1942 vop_setextattr_ap(struct vop_setextattr_args
*ap
)
1946 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_setextattr
);
1951 vop_mountctl_ap(struct vop_mountctl_args
*ap
)
1955 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_mountctl
);
1960 vop_markatime_ap(struct vop_markatime_args
*ap
)
1964 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_markatime
);
1969 vop_nresolve_ap(struct vop_nresolve_args
*ap
)
1973 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nresolve
);
1978 vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args
*ap
)
1982 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nlookupdotdot
);
1987 vop_ncreate_ap(struct vop_ncreate_args
*ap
)
1991 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_ncreate
);
1996 vop_nmkdir_ap(struct vop_nmkdir_args
*ap
)
2000 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nmkdir
);
2005 vop_nmknod_ap(struct vop_nmknod_args
*ap
)
2009 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nmknod
);
2014 vop_nlink_ap(struct vop_nlink_args
*ap
)
2018 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nlink
);
2023 vop_nsymlink_ap(struct vop_nsymlink_args
*ap
)
2027 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nsymlink
);
2032 vop_nwhiteout_ap(struct vop_nwhiteout_args
*ap
)
2036 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nwhiteout
);
2041 vop_nremove_ap(struct vop_nremove_args
*ap
)
2045 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nremove
);
2050 vop_nrmdir_ap(struct vop_nrmdir_args
*ap
)
2054 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nrmdir
);
2059 vop_nrename_ap(struct vop_nrename_args
*ap
)
2063 DO_OPS(ap
->a_head
.a_ops
, error
, ap
, vop_nrename
);