Add a flags argument to VOP_FSYNC()
[dragonfly.git] / sys / sys / vfsops.h
1 /*
2  * Copyright (c) 2004 The DragonFly Project.  All rights reserved.
3  * 
4  * This code is derived from software contributed to The DragonFly Project
5  * by Matthew Dillon <dillon@backplane.com>
6  * 
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 
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
16  *    distribution.
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.
20  * 
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
32  * SUCH DAMAGE.
33  *
34  * $DragonFly: src/sys/sys/vfsops.h,v 1.32 2008/06/19 23:27:36 dillon Exp $
35  */
36
37 /*
38  * The vop_ops structure vectors all access to a filesystem.  It contains a
39  * fixed set of vectors.
40  *
41  * In DragonFly the ultimate goal is to thread the VFS, which means that
42  * the dispatch functions will eventually be called from the context of 
43  * a management thread rather then directly called by a process.  This
44  * requires us to divorce direct process dependancies (in particular ioctl
45  * and UIO's).  In addition, it is our intention to implement kernel
46  * level cache management and coherency in the vop_*() interfacing
47  * layer.
48  *
49  * The number of management threads will depend on the VFS.  The idea is
50  * to give a high performance VFS such as UFS at least one thread per cpu,
51  * and a low performance VFS such as CD9660 perhaps just one thread period.
52  * Blocking issues within the management thread are up to the VFS itself,
53  * but DragonFly will introduce a layer above the VFS to handle cacheable
54  * requests without having to enter the VFS (e.g. by making attribute
55  * and VM object information a permanent fixture of the vnode structure
56  * and accessing them directly).
57  *
58  * THE VOPOPS VECTORS SHOULD NEVER BE CALLED DIRECTLY!  Instead always use
59  * the kernel helper procedures vop_*() to call a vopop.  The kernel
60  * helper procedure will be responsible for handling the DragonFly messaging
61  * conversion when it occurs.
62  */
63
64 #ifndef _SYS_VFSOPS_H_
65 #define _SYS_VFSOPS_H_
66
67 #ifndef _SYS_ACL_H_
68 #include <sys/acl.h>
69 #endif
70 #ifndef _SYS_BUF_H_
71 #include <sys/buf.h>    /* buf_cmd_t */
72 #endif
73
74 struct syslink_desc;
75 struct vnode;
76 struct thread;
77 struct nchandle;
78 struct componentname;
79 struct vattr;
80 struct ucred;
81 struct uio;
82 struct file;
83 struct knote;
84 struct vm_object;
85 struct vm_page;
86 struct vfscache;
87
88 struct vop_generic_args {
89         struct syslink_desc *a_desc;    /* command descriptor for the call */
90         struct vop_ops *a_ops;          /* operations vector for the call */
91         int a_reserved[4];
92 };
93
94 struct vop_old_lookup_args {
95         struct vop_generic_args a_head;
96         struct vnode *a_dvp;
97         struct vnode **a_vpp;
98         struct componentname *a_cnp;
99 };
100
101 struct vop_old_create_args {
102         struct vop_generic_args a_head;
103         struct vnode *a_dvp;
104         struct vnode **a_vpp;
105         struct componentname *a_cnp;
106         struct vattr *a_vap;
107 };
108
109 struct vop_old_whiteout_args {
110         struct vop_generic_args a_head;
111         struct vnode *a_dvp;
112         struct componentname *a_cnp;
113         int a_flags;
114 };
115
116 struct vop_old_mknod_args {
117         struct vop_generic_args a_head;
118         struct vnode *a_dvp;
119         struct vnode **a_vpp;
120         struct componentname *a_cnp;
121         struct vattr *a_vap;
122 };
123
124 struct vop_open_args {
125         struct vop_generic_args a_head;
126         struct vnode *a_vp;
127         int a_mode;
128         struct ucred *a_cred;
129         struct file *a_fp;              /* optional fp for fileops override */
130 };
131
132 struct vop_close_args {
133         struct vop_generic_args a_head;
134         struct vnode *a_vp;
135         int a_fflag;
136 };
137
138 struct vop_access_args {
139         struct vop_generic_args a_head;
140         struct vnode *a_vp;
141         int a_mode;                             /* V* bitmask */
142         int a_flags;                            /* AT_* bitmask */
143         struct ucred *a_cred;
144 };
145
146 struct vop_getattr_args {
147         struct vop_generic_args a_head;
148         struct vnode *a_vp;
149         struct vattr *a_vap;
150 };
151
152 struct vop_setattr_args {
153         struct vop_generic_args a_head;
154         struct vnode *a_vp;
155         struct vattr *a_vap;
156         struct ucred *a_cred;
157 };
158
159 struct vop_read_args {
160         struct vop_generic_args a_head;
161         struct vnode *a_vp;
162         struct uio *a_uio;
163         int a_ioflag;
164         struct ucred *a_cred;
165 };
166
167 struct vop_write_args {
168         struct vop_generic_args a_head;
169         struct vnode *a_vp;
170         struct uio *a_uio;
171         int a_ioflag;
172         struct ucred *a_cred;
173 };
174
175 struct vop_ioctl_args {
176         struct vop_generic_args a_head;
177         struct vnode *a_vp;
178         u_long a_command;
179         caddr_t a_data;
180         int a_fflag;
181         struct ucred *a_cred;
182 };
183
184 struct vop_poll_args {
185         struct vop_generic_args a_head;
186         struct vnode *a_vp;
187         int a_events;
188         struct ucred *a_cred;
189 };
190
191 struct vop_kqfilter_args {
192         struct vop_generic_args a_head;
193         struct vnode *a_vp;
194         struct knote *a_kn;
195 };
196
197 struct vop_mmap_args {
198         struct vop_generic_args a_head;
199         struct vnode *a_vp;
200         int a_fflags;
201         struct ucred *a_cred;
202 };
203
204 struct vop_fsync_args {
205         struct vop_generic_args a_head;
206         struct vnode *a_vp;
207         int a_waitfor;
208         int a_flags;
209 };
210
211 struct vop_old_remove_args {
212         struct vop_generic_args a_head;
213         struct vnode *a_dvp;
214         struct vnode *a_vp;
215         struct componentname *a_cnp;
216 };
217
218 struct vop_old_link_args {
219         struct vop_generic_args a_head;
220         struct vnode *a_tdvp;
221         struct vnode *a_vp;
222         struct componentname *a_cnp;
223 };
224
225 struct vop_old_rename_args {
226         struct vop_generic_args a_head;
227         struct vnode *a_fdvp;
228         struct vnode *a_fvp;
229         struct componentname *a_fcnp;
230         struct vnode *a_tdvp;
231         struct vnode *a_tvp;
232         struct componentname *a_tcnp;
233 };
234
235 struct vop_old_mkdir_args {
236         struct vop_generic_args a_head;
237         struct vnode *a_dvp;
238         struct vnode **a_vpp;
239         struct componentname *a_cnp;
240         struct vattr *a_vap;
241 };
242
243 struct vop_old_rmdir_args {
244         struct vop_generic_args a_head;
245         struct vnode *a_dvp;
246         struct vnode *a_vp;
247         struct componentname *a_cnp;
248 };
249
250 struct vop_old_symlink_args {
251         struct vop_generic_args a_head;
252         struct vnode *a_dvp;
253         struct vnode **a_vpp;
254         struct componentname *a_cnp;
255         struct vattr *a_vap;
256         char *a_target;
257 };
258
259 struct vop_readdir_args {
260         struct vop_generic_args a_head;
261         struct vnode *a_vp;
262         struct uio *a_uio;
263         struct ucred *a_cred;
264         int *a_eofflag;
265         int *a_ncookies;
266         off_t **a_cookies;
267 };
268
269 struct vop_readlink_args {
270         struct vop_generic_args a_head;
271         struct vnode *a_vp;
272         struct uio *a_uio;
273         struct ucred *a_cred;
274 };
275
276 struct vop_inactive_args {
277         struct vop_generic_args a_head;
278         struct vnode *a_vp;
279 };
280
281 struct vop_reclaim_args {
282         struct vop_generic_args a_head;
283         struct vnode *a_vp;
284 };
285
286 struct vop_bmap_args {
287         struct vop_generic_args a_head;
288         struct vnode *a_vp;
289         off_t a_loffset;
290         off_t *a_doffsetp;
291         int *a_runp;
292         int *a_runb;
293         buf_cmd_t a_cmd;        /* BUF_CMD_READ, BUF_CMD_WRITE, etc */
294 };
295
296 struct vop_strategy_args {
297         struct vop_generic_args a_head;
298         struct vnode *a_vp;
299         struct bio *a_bio;
300 };
301
302 struct vop_print_args {
303         struct vop_generic_args a_head;
304         struct vnode *a_vp;
305 };
306
307 struct vop_pathconf_args {
308         struct vop_generic_args a_head;
309         struct vnode *a_vp;
310         int a_name;
311         register_t *a_retval;
312 };
313
314 struct vop_advlock_args {
315         struct vop_generic_args a_head;
316         struct vnode *a_vp;
317         caddr_t a_id;
318         int a_op;
319         struct flock *a_fl;
320         int a_flags;
321 };
322
323 struct vop_balloc_args {
324         struct vop_generic_args a_head;
325         struct vnode *a_vp;
326         off_t a_startoffset;
327         int a_size;
328         struct ucred *a_cred;
329         int a_flags;
330         struct buf **a_bpp;
331 };
332
333 struct vop_reallocblks_args {
334         struct vop_generic_args a_head;
335         struct vnode *a_vp;
336         struct cluster_save *a_buflist;
337 };
338
339 struct vop_getpages_args {
340         struct vop_generic_args a_head;
341         struct vnode *a_vp;
342         struct vm_page **a_m;
343         int a_count;
344         int a_reqpage;
345         vm_ooffset_t a_offset;
346 };
347
348 struct vop_putpages_args {
349         struct vop_generic_args a_head;
350         struct vnode *a_vp;
351         struct vm_page **a_m;
352         int a_count;
353         int a_sync;
354         int *a_rtvals;
355         vm_ooffset_t a_offset;
356 };
357
358 struct vop_freeblks_args {
359         struct vop_generic_args a_head;
360         struct vnode *a_vp;
361         off_t a_offset;
362         int a_length;
363 };
364
365 struct vop_getacl_args {
366         struct vop_generic_args a_head;
367         struct vnode *a_vp;
368         acl_type_t a_type;
369         struct acl *a_aclp;
370         struct ucred *a_cred;
371 };
372
373 struct vop_setacl_args {
374         struct vop_generic_args a_head;
375         struct vnode *a_vp;
376         acl_type_t a_type;
377         struct acl *a_aclp;
378         struct ucred *a_cred;
379 };
380
381 struct vop_aclcheck_args {
382         struct vop_generic_args a_head;
383         struct vnode *a_vp;
384         acl_type_t a_type;
385         struct acl *a_aclp;
386         struct ucred *a_cred;
387 };
388
389 struct vop_getextattr_args {
390         struct vop_generic_args a_head;
391         struct vnode *a_vp;
392         char *a_name;
393         struct uio *a_uio;
394         struct ucred *a_cred;
395 };
396
397 struct vop_setextattr_args {
398         struct vop_generic_args a_head;
399         struct vnode *a_vp;
400         char *a_name;
401         struct uio *a_uio;
402         struct ucred *a_cred;
403 };
404
405 struct vop_mountctl_args {
406         struct vop_generic_args a_head;
407         int a_op;
408         struct file *a_fp;
409         const void *a_ctl;
410         int a_ctllen;
411         void *a_buf;
412         int a_buflen;
413         int *a_res;
414 };
415
416 struct vop_markatime_args {
417         struct vop_generic_args a_head;
418         int a_op;
419         struct vnode *a_vp;
420         struct ucred *a_cred;
421 };
422
423 /*
424  * NEW API
425  */
426
427 /*
428  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
429  * it.
430  */
431 struct vop_nresolve_args {
432         struct vop_generic_args a_head;
433         struct nchandle *a_nch;
434         struct vnode *a_dvp;
435         struct ucred *a_cred;
436 };
437
438 struct vop_nlookupdotdot_args {
439         struct vop_generic_args a_head;
440         struct vnode *a_dvp;
441         struct vnode **a_vpp;
442         struct ucred *a_cred;
443         char **a_fakename;
444 };
445
446 /*
447  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
448  * it.
449  */
450 struct vop_ncreate_args {
451         struct vop_generic_args a_head;
452         struct nchandle *a_nch;         /* locked namespace */
453         struct vnode *a_dvp;            /* held directory vnode */
454         struct vnode **a_vpp;           /* returned refd & locked */
455         struct ucred *a_cred;
456         struct vattr *a_vap;
457 };
458
459 /*
460  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
461  * it.
462  */
463 struct vop_nmkdir_args {
464         struct vop_generic_args a_head;
465         struct nchandle *a_nch;         /* locked namespace */
466         struct vnode *a_dvp;
467         struct vnode **a_vpp;                   /* returned refd & locked */
468         struct ucred *a_cred;
469         struct vattr *a_vap;
470 };
471
472 /*
473  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
474  * it.
475  */
476 struct vop_nmknod_args {
477         struct vop_generic_args a_head;
478         struct nchandle *a_nch;
479         struct vnode *a_dvp;
480         struct vnode **a_vpp;
481         struct ucred *a_cred;
482         struct vattr *a_vap;
483 };
484
485 /*
486  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
487  * it.
488  */
489 struct vop_nlink_args {
490         struct vop_generic_args a_head;
491         struct nchandle *a_nch;
492         struct vnode *a_dvp;
493         struct vnode *a_vp;
494         struct ucred *a_cred;
495 };
496
497 /*
498  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
499  * it.
500  */
501 struct vop_nsymlink_args {
502         struct vop_generic_args a_head;
503         struct nchandle *a_nch;
504         struct vnode *a_dvp;
505         struct vnode **a_vpp;
506         struct ucred *a_cred;
507         struct vattr *a_vap;
508         char *a_target;
509 };
510
511 /*
512  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
513  * it.
514  */
515 struct vop_nwhiteout_args {
516         struct vop_generic_args a_head;
517         struct nchandle *a_nch;
518         struct vnode *a_dvp;
519         struct ucred *a_cred;
520         int a_flags;
521 };
522
523 /*
524  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
525  * it.
526  */
527 struct vop_nremove_args {
528         struct vop_generic_args a_head;
529         struct nchandle *a_nch;         /* locked namespace */
530         struct vnode *a_dvp;
531         struct ucred *a_cred;
532 };
533
534 /*
535  * Warning: a_dvp is only held, not ref'd.  The target must still vget()
536  * it.
537  */
538 struct vop_nrmdir_args {
539         struct vop_generic_args a_head;
540         struct nchandle *a_nch;         /* locked namespace */
541         struct vnode *a_dvp;
542         struct ucred *a_cred;
543 };
544
545 /*
546  * Warning: a_fdvp and a_tdvp are only held, not ref'd.  The target must
547  * still vget() it.
548  */
549 struct vop_nrename_args {
550         struct vop_generic_args a_head;
551         struct nchandle *a_fnch;                /* locked namespace / from */
552         struct nchandle *a_tnch;                /* locked namespace / to */
553         struct vnode *a_fdvp;
554         struct vnode *a_tdvp;
555         struct ucred *a_cred;
556 };
557
558 /*
559  * This structure is the post-compiled VOP operations vector.  vop_ops are
560  * typically per-mount entities.  The first section is used by our vop_*()
561  * function wrappers to implement hooks for per-mount management functions
562  * such as journaling and cache coherency protocols.  The second section is
563  * the function dispatch for the VFSs.  The functions are supposed to run
564  * in the context of the VFS's thread (if it has one) and should not be 
565  * directly called from random kernel code.  Note that VOCALL()s are direct
566  * calls used for chaining vop_ops structures from a VFS context.
567  */
568 struct vop_ops {
569         struct {
570                 struct mount    *vv_mount;
571         } head;
572
573 #define vop_ops_first_field     vop_default
574         int     (*vop_default)(struct vop_generic_args *);
575         int     (*vop_unused11)(void *);
576         int     (*vop_old_lookup)(struct vop_old_lookup_args *);
577         int     (*vop_unused03)(void *);
578         int     (*vop_old_create)(struct vop_old_create_args *);
579         int     (*vop_old_whiteout)(struct vop_old_whiteout_args *);
580         int     (*vop_old_mknod)(struct vop_old_mknod_args *);
581         int     (*vop_open)(struct vop_open_args *);
582         int     (*vop_close)(struct vop_close_args *);
583         int     (*vop_access)(struct vop_access_args *);
584         int     (*vop_getattr)(struct vop_getattr_args *);
585         int     (*vop_setattr)(struct vop_setattr_args *);
586         int     (*vop_read)(struct vop_read_args *);
587         int     (*vop_write)(struct vop_write_args *);
588         int     (*vop_unused04)(void *);
589         int     (*vop_ioctl)(struct vop_ioctl_args *);
590         int     (*vop_poll)(struct vop_poll_args *);
591         int     (*vop_kqfilter)(struct vop_kqfilter_args *);
592         int     (*vop_unused01)(void *);        /* was vop_revoke */
593         int     (*vop_mmap)(struct vop_mmap_args *);
594         int     (*vop_fsync)(struct vop_fsync_args *);
595         int     (*vop_old_remove)(struct vop_old_remove_args *);
596         int     (*vop_old_link)(struct vop_old_link_args *);
597         int     (*vop_old_rename)(struct vop_old_rename_args *);
598         int     (*vop_old_mkdir)(struct vop_old_mkdir_args *);
599         int     (*vop_old_rmdir)(struct vop_old_rmdir_args *);
600         int     (*vop_old_symlink)(struct vop_old_symlink_args *);
601         int     (*vop_readdir)(struct vop_readdir_args *);
602         int     (*vop_readlink)(struct vop_readlink_args *);
603         int     (*vop_inactive)(struct vop_inactive_args *);
604         int     (*vop_reclaim)(struct vop_reclaim_args *);
605         int     (*vop_unused09)(void *);
606         int     (*vop_unused10)(void *);
607         int     (*vop_bmap)(struct vop_bmap_args *);
608         int     (*vop_strategy)(struct vop_strategy_args *);
609         int     (*vop_print)(struct vop_print_args *);
610         int     (*vop_pathconf)(struct vop_pathconf_args *);
611         int     (*vop_advlock)(struct vop_advlock_args *);
612         int     (*vop_balloc)(struct vop_balloc_args *);
613         int     (*vop_reallocblks)(struct vop_reallocblks_args *);
614         int     (*vop_getpages)(struct vop_getpages_args *);
615         int     (*vop_putpages)(struct vop_putpages_args *);
616         int     (*vop_freeblks)(struct vop_freeblks_args *);
617         int     (*vop_unused05)(void *);
618         int     (*vop_getacl)(struct vop_getacl_args *);
619         int     (*vop_setacl)(struct vop_setacl_args *);
620         int     (*vop_aclcheck)(struct vop_aclcheck_args *);
621         int     (*vop_getextattr)(struct vop_getextattr_args *);
622         int     (*vop_setextattr)(struct vop_setextattr_args *);
623         int     (*vop_unused06)(void *);
624         int     (*vop_unused07)(void *);
625         int     (*vop_unused08)(void *);
626         int     (*vop_mountctl)(struct vop_mountctl_args *);
627         int     (*vop_markatime)(struct vop_markatime_args *);
628
629         int     (*vop_nresolve)(struct vop_nresolve_args *);
630         int     (*vop_nlookupdotdot)(struct vop_nlookupdotdot_args *);
631         int     (*vop_ncreate)(struct vop_ncreate_args *);
632         int     (*vop_nmkdir)(struct vop_nmkdir_args *);
633         int     (*vop_nmknod)(struct vop_nmknod_args *);
634         int     (*vop_nlink)(struct vop_nlink_args *);
635         int     (*vop_nsymlink)(struct vop_nsymlink_args *);
636         int     (*vop_nwhiteout)(struct vop_nwhiteout_args *);
637         int     (*vop_nremove)(struct vop_nremove_args *);
638         int     (*vop_nrmdir)(struct vop_nrmdir_args *);
639         int     (*vop_nrename)(struct vop_nrename_args *);
640 #define vop_ops_last_field      vop_nrename
641 };
642
643 /*
644  * vop_mountctl() operations
645  */
646 #define VFSSET_DETACH           0
647 #define VFSSET_ATTACH           1
648
649 /*
650  * Kernel VOP arguments union, suitable for malloc / embedding in other
651  * structures.  The vop_args_union can hold any VOP call argument structure.
652  * Note that vu_head is broken out.
653  */
654 union vop_args_union {
655         struct vop_generic_args vu_head;
656         struct vop_generic_args vu_default;
657         struct vop_old_lookup_args vu_lookup;
658         struct vop_old_create_args vu_create;
659         struct vop_old_whiteout_args vu_whiteout;
660         struct vop_old_mknod_args vu_mknod;
661         struct vop_open_args vu_open;
662         struct vop_close_args vu_close;
663         struct vop_access_args vu_access;
664         struct vop_getattr_args vu_getattr;
665         struct vop_setattr_args vu_setattr;
666         struct vop_read_args vu_read;
667         struct vop_write_args vu_write;
668         struct vop_ioctl_args vu_ioctl;
669         struct vop_poll_args vu_poll;
670         struct vop_kqfilter_args vu_kqfilter;
671         struct vop_mmap_args vu_mmap;
672         struct vop_fsync_args vu_fsync;
673         struct vop_old_remove_args vu_remove;
674         struct vop_old_link_args vu_link;
675         struct vop_old_rename_args vu_rename;
676         struct vop_old_mkdir_args vu_mkdir;
677         struct vop_old_rmdir_args vu_rmdir;
678         struct vop_old_symlink_args vu_symlink;
679         struct vop_readdir_args vu_readdir;
680         struct vop_readlink_args vu_readlink;
681         struct vop_inactive_args vu_inactive;
682         struct vop_reclaim_args vu_reclaim;
683         struct vop_bmap_args vu_bmap;
684         struct vop_strategy_args vu_strategy;
685         struct vop_print_args vu_print;
686         struct vop_pathconf_args vu_pathconf;
687         struct vop_advlock_args vu_advlock;
688         struct vop_balloc_args vu_balloc;
689         struct vop_reallocblks_args vu_reallocblks;
690         struct vop_getpages_args vu_getpages;
691         struct vop_putpages_args vu_putpages;
692         struct vop_freeblks_args vu_freeblks;
693         struct vop_getacl_args vu_getacl;
694         struct vop_setacl_args vu_setacl;
695         struct vop_aclcheck_args vu_aclcheck;
696         struct vop_getextattr_args vu_getextattr;
697         struct vop_setextattr_args vu_setextattr;
698         struct vop_mountctl_args vu_mountctl;
699         struct vop_markatime_args vu_markatime;
700
701         struct vop_nresolve_args vu_nresolve;
702         struct vop_nlookupdotdot_args vu_nlookupdotdot;
703         struct vop_ncreate_args vu_ncreate;
704         struct vop_nmkdir_args vu_nmkdir;
705         struct vop_nmknod_args vu_nmknod;
706         struct vop_nlink_args vu_nlink;
707         struct vop_nsymlink_args vu_nsymlink;
708         struct vop_nwhiteout_args vu_nwhiteout;
709         struct vop_nremove_args vu_nremove;
710         struct vop_nrmdir_args vu_nrmdir;
711         struct vop_nrename_args vu_nrename;
712 };
713
714 #ifdef _KERNEL
715
716 /*
717  * Kernel VOP call wrappers.  These wrappers are responsible for wrapping
718  * the arguments in the appropriate VOP arguments structure, sending the
719  * message, and waiting for a reply.  All kernel and VFS code should generally
720  * call these wrappers rather then attempt to call the operations vector
721  * routine directly in order to allow DragonFly to properly wrap the operation
722  * in a message and dispatch it to the correct thread.
723  */
724 int vop_old_lookup(struct vop_ops *ops, struct vnode *dvp, 
725                 struct vnode **vpp, struct componentname *cnp);
726 int vop_old_create(struct vop_ops *ops, struct vnode *dvp,
727                 struct vnode **vpp, struct componentname *cnp,
728                 struct vattr *vap);
729 int vop_old_whiteout(struct vop_ops *ops, struct vnode *dvp, 
730                 struct componentname *cnp, int flags);
731 int vop_old_mknod(struct vop_ops *ops, struct vnode *dvp, 
732                 struct vnode **vpp, struct componentname *cnp,
733                 struct vattr *vap);
734 int vop_open(struct vop_ops *ops, struct vnode *vp, int mode,
735                 struct ucred *cred, struct file *file);
736 int vop_close(struct vop_ops *ops, struct vnode *vp, int fflag);
737 int vop_access(struct vop_ops *ops, struct vnode *vp, int mode, int flags,
738                 struct ucred *cred);
739 int vop_getattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap);
740 int vop_setattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap,
741                 struct ucred *cred);
742 int vop_read(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
743                 int ioflag, struct ucred *cred);
744 int vop_write(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
745                 int ioflag, struct ucred *cred);
746 int vop_ioctl(struct vop_ops *ops, struct vnode *vp, u_long command,
747                 caddr_t data, int fflag, struct ucred *cred);
748 int vop_poll(struct vop_ops *ops, struct vnode *vp, int events,
749                 struct ucred *cred);
750 int vop_kqfilter(struct vop_ops *ops, struct vnode *vp, struct knote *kn);
751 int vop_mmap(struct vop_ops *ops, struct vnode *vp, int fflags,
752                 struct ucred *cred);
753 int vop_fsync(struct vop_ops *ops, struct vnode *vp, int waitfor, int flags);
754 int vop_old_remove(struct vop_ops *ops, struct vnode *dvp,
755                 struct vnode *vp, struct componentname *cnp);
756 int vop_old_link(struct vop_ops *ops, struct vnode *tdvp,
757                 struct vnode *vp, struct componentname *cnp);
758 int vop_old_rename(struct vop_ops *ops, struct vnode *fdvp,
759                 struct vnode *fvp, struct componentname *fcnp,
760                 struct vnode *tdvp, struct vnode *tvp,
761                 struct componentname *tcnp);
762 int vop_old_mkdir(struct vop_ops *ops, struct vnode *dvp,
763                 struct vnode **vpp, struct componentname *cnp,
764                 struct vattr *vap);
765 int vop_old_rmdir(struct vop_ops *ops, struct vnode *dvp,
766                 struct vnode *vp, struct componentname *cnp);
767 int vop_old_symlink(struct vop_ops *ops, struct vnode *dvp,
768                 struct vnode **vpp, struct componentname *cnp,
769                 struct vattr *vap, char *target);
770 int vop_readdir(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
771                 struct ucred *cred, int *eofflag, 
772                 int *ncookies, off_t **cookies);
773 int vop_readlink(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
774                 struct ucred *cred);
775 int vop_inactive(struct vop_ops *ops, struct vnode *vp);
776 int vop_reclaim(struct vop_ops *ops, struct vnode *vp);
777 int vop_bmap(struct vop_ops *ops, struct vnode *vp, off_t loffset,
778                 off_t *doffsetp, int *runp, int *runb, buf_cmd_t cmd);
779 int vop_strategy(struct vop_ops *ops, struct vnode *vp, struct bio *bio);
780 int vop_print(struct vop_ops *ops, struct vnode *vp);
781 int vop_pathconf(struct vop_ops *ops, struct vnode *vp, int name,
782                 register_t *retval);
783 int vop_advlock(struct vop_ops *ops, struct vnode *vp, caddr_t id, int op,
784                 struct flock *fl, int flags);
785 int vop_balloc(struct vop_ops *ops, struct vnode *vp, off_t startoffset,
786                 int size, struct ucred *cred, int flags,
787                 struct buf **bpp);
788 int vop_reallocblks(struct vop_ops *ops, struct vnode *vp,
789                 struct cluster_save *buflist);
790 int vop_getpages(struct vop_ops *ops, struct vnode *vp, struct vm_page **m,
791                 int count, int reqpage, vm_ooffset_t offset);
792 int vop_putpages(struct vop_ops *ops, struct vnode *vp, struct vm_page **m,
793                 int count, int sync, int *rtvals, vm_ooffset_t offset);
794 int vop_freeblks(struct vop_ops *ops, struct vnode *vp,
795                 off_t offset, int length);
796 int vop_getacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
797                 struct acl *aclp, struct ucred *cred);
798 int vop_setacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
799                 struct acl *aclp, struct ucred *cred);
800 int vop_aclcheck(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
801                 struct acl *aclp, struct ucred *cred);
802 int vop_getextattr(struct vop_ops *ops, struct vnode *vp, char *name, 
803                 struct uio *uio, struct ucred *cred);
804 int vop_setextattr(struct vop_ops *ops, struct vnode *vp, char *name, 
805                 struct uio *uio, struct ucred *cred);
806 int vop_mountctl(struct vop_ops *ops, int op, struct file *fp, 
807                 const void *ctl, int ctllen, void *buf, int buflen, int *res);
808 int vop_markatime(struct vop_ops *ops, struct vnode *vp, struct ucred *cred);
809 int vop_nresolve(struct vop_ops *ops, struct nchandle *nch,
810                 struct vnode *dvp, struct ucred *cred);
811 int vop_nlookupdotdot(struct vop_ops *ops, struct vnode *dvp,
812                 struct vnode **vpp, struct ucred *cred, char **fakename);
813 int vop_ncreate(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
814                 struct vnode **vpp, struct ucred *cred, struct vattr *vap);
815 int vop_nmkdir(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
816                 struct vnode **vpp, struct ucred *cred, struct vattr *vap);
817 int vop_nmknod(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
818                 struct vnode **vpp, struct ucred *cred, struct vattr *vap);
819 int vop_nlink(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
820                 struct vnode *vp, struct ucred *cred);
821 int vop_nsymlink(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
822                 struct vnode **vpp, struct ucred *cred,
823                 struct vattr *vap, char *target);
824 int vop_nwhiteout(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
825                 struct ucred *cred, int flags);
826 int vop_nremove(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
827                 struct ucred *cred);
828 int vop_nrmdir(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
829                 struct ucred *cred);
830 int vop_nrename(struct vop_ops *ops,
831                 struct nchandle *fnch, struct nchandle *tnch,
832                 struct vnode *fdvp, struct vnode *tdvp,
833                 struct ucred *cred);
834
835 /*
836  * Kernel VOP forwarding wrappers.  These are called when a VFS such as
837  * nullfs or unionfs needs to push down into another VFS, changing the 
838  * a_ops pointer and consequentially necessitating additional 
839  * cache management.
840  *
841  * Note that this is different from vop_ops chaining within the same
842  * filesystem.  When a filesystem chains a vop_ops it just uses VOCALLs.
843  */
844 int vop_vnoperate_ap(struct vop_generic_args *ap);
845 int vop_cache_operate_ap(struct vop_generic_args *ap);
846 int vop_journal_operate_ap(struct vop_generic_args *ap);
847 int vop_old_lookup_ap(struct vop_old_lookup_args *ap);
848 int vop_old_create_ap(struct vop_old_create_args *ap);
849 int vop_old_whiteout_ap(struct vop_old_whiteout_args *ap);
850 int vop_old_mknod_ap(struct vop_old_mknod_args *ap);
851 int vop_open_ap(struct vop_open_args *ap);
852 int vop_close_ap(struct vop_close_args *ap);
853 int vop_access_ap(struct vop_access_args *ap);
854 int vop_getattr_ap(struct vop_getattr_args *ap);
855 int vop_setattr_ap(struct vop_setattr_args *ap);
856 int vop_read_ap(struct vop_read_args *ap);
857 int vop_write_ap(struct vop_write_args *ap);
858 int vop_ioctl_ap(struct vop_ioctl_args *ap);
859 int vop_poll_ap(struct vop_poll_args *ap);
860 int vop_kqfilter_ap(struct vop_kqfilter_args *ap);
861 int vop_mmap_ap(struct vop_mmap_args *ap);
862 int vop_fsync_ap(struct vop_fsync_args *ap);
863 int vop_old_remove_ap(struct vop_old_remove_args *ap);
864 int vop_old_link_ap(struct vop_old_link_args *ap);
865 int vop_old_rename_ap(struct vop_old_rename_args *ap);
866 int vop_old_mkdir_ap(struct vop_old_mkdir_args *ap);
867 int vop_old_rmdir_ap(struct vop_old_rmdir_args *ap);
868 int vop_old_symlink_ap(struct vop_old_symlink_args *ap);
869 int vop_readdir_ap(struct vop_readdir_args *ap);
870 int vop_readlink_ap(struct vop_readlink_args *ap);
871 int vop_inactive_ap(struct vop_inactive_args *ap);
872 int vop_reclaim_ap(struct vop_reclaim_args *ap);
873 int vop_bmap_ap(struct vop_bmap_args *ap);
874 int vop_strategy_ap(struct vop_strategy_args *ap);
875 int vop_print_ap(struct vop_print_args *ap);
876 int vop_pathconf_ap(struct vop_pathconf_args *ap);
877 int vop_advlock_ap(struct vop_advlock_args *ap);
878 int vop_balloc_ap(struct vop_balloc_args *ap);
879 int vop_reallocblks_ap(struct vop_reallocblks_args *ap);
880 int vop_getpages_ap(struct vop_getpages_args *ap);
881 int vop_putpages_ap(struct vop_putpages_args *ap);
882 int vop_freeblks_ap(struct vop_freeblks_args *ap);
883 int vop_getacl_ap(struct vop_getacl_args *ap);
884 int vop_setacl_ap(struct vop_setacl_args *ap);
885 int vop_aclcheck_ap(struct vop_aclcheck_args *ap);
886 int vop_getextattr_ap(struct vop_getextattr_args *ap);
887 int vop_setextattr_ap(struct vop_setextattr_args *ap);
888 int vop_mountctl_ap(struct vop_mountctl_args *ap);
889 int vop_markatime_ap(struct vop_markatime_args *ap);
890
891 int vop_nresolve_ap(struct vop_nresolve_args *ap);
892 int vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args *ap);
893 int vop_ncreate_ap(struct vop_ncreate_args *ap);
894 int vop_nmkdir_ap(struct vop_nmkdir_args *ap);
895 int vop_nmknod_ap(struct vop_nmknod_args *ap);
896 int vop_nlink_ap(struct vop_nlink_args *ap);
897 int vop_nsymlink_ap(struct vop_nsymlink_args *ap);
898 int vop_nwhiteout_ap(struct vop_nwhiteout_args *ap);
899 int vop_nremove_ap(struct vop_nremove_args *ap);
900 int vop_nrmdir_ap(struct vop_nrmdir_args *ap);
901 int vop_nrename_ap(struct vop_nrename_args *ap);
902
903 /*
904  * VOP operations descriptor.  This is used by the vop_ops compiler
905  * to convert VFS vector arrays (typically in vfs/blah/blah_vnops.c)
906  * into a vop_ops operations vector.
907  */
908 extern struct syslink_desc vop_default_desc;
909 extern struct syslink_desc vop_old_lookup_desc;
910 extern struct syslink_desc vop_old_create_desc;
911 extern struct syslink_desc vop_old_whiteout_desc;
912 extern struct syslink_desc vop_old_mknod_desc;
913 extern struct syslink_desc vop_open_desc;
914 extern struct syslink_desc vop_close_desc;
915 extern struct syslink_desc vop_access_desc;
916 extern struct syslink_desc vop_getattr_desc;
917 extern struct syslink_desc vop_setattr_desc;
918 extern struct syslink_desc vop_read_desc;
919 extern struct syslink_desc vop_write_desc;
920 extern struct syslink_desc vop_ioctl_desc;
921 extern struct syslink_desc vop_poll_desc;
922 extern struct syslink_desc vop_kqfilter_desc;
923 extern struct syslink_desc vop_mmap_desc;
924 extern struct syslink_desc vop_fsync_desc;
925 extern struct syslink_desc vop_old_remove_desc;
926 extern struct syslink_desc vop_old_link_desc;
927 extern struct syslink_desc vop_old_rename_desc;
928 extern struct syslink_desc vop_old_mkdir_desc;
929 extern struct syslink_desc vop_old_rmdir_desc;
930 extern struct syslink_desc vop_old_symlink_desc;
931 extern struct syslink_desc vop_readdir_desc;
932 extern struct syslink_desc vop_readlink_desc;
933 extern struct syslink_desc vop_inactive_desc;
934 extern struct syslink_desc vop_reclaim_desc;
935 extern struct syslink_desc vop_bmap_desc;
936 extern struct syslink_desc vop_strategy_desc;
937 extern struct syslink_desc vop_print_desc;
938 extern struct syslink_desc vop_pathconf_desc;
939 extern struct syslink_desc vop_advlock_desc;
940 extern struct syslink_desc vop_balloc_desc;
941 extern struct syslink_desc vop_reallocblks_desc;
942 extern struct syslink_desc vop_getpages_desc;
943 extern struct syslink_desc vop_putpages_desc;
944 extern struct syslink_desc vop_freeblks_desc;
945 extern struct syslink_desc vop_getacl_desc;
946 extern struct syslink_desc vop_setacl_desc;
947 extern struct syslink_desc vop_aclcheck_desc;
948 extern struct syslink_desc vop_getextattr_desc;
949 extern struct syslink_desc vop_setextattr_desc;
950 extern struct syslink_desc vop_mountctl_desc;
951 extern struct syslink_desc vop_markatime_desc;
952
953 extern struct syslink_desc vop_nresolve_desc;
954 extern struct syslink_desc vop_nlookupdotdot_desc;
955 extern struct syslink_desc vop_ncreate_desc;
956 extern struct syslink_desc vop_nmkdir_desc;
957 extern struct syslink_desc vop_nmknod_desc;
958 extern struct syslink_desc vop_nlink_desc;
959 extern struct syslink_desc vop_nsymlink_desc;
960 extern struct syslink_desc vop_nwhiteout_desc;
961 extern struct syslink_desc vop_nremove_desc;
962 extern struct syslink_desc vop_nrmdir_desc;
963 extern struct syslink_desc vop_nrename_desc;
964
965 #endif
966
967 /*
968  * VOP_*() convenience macros extract the operations vector and make the
969  * vop_*() call.
970  */
971 #define VOP_OPEN(vp, mode, cred, fp)                    \
972         vop_open(*(vp)->v_ops, vp, mode, cred, fp)
973 #define VOP_CLOSE(vp, fflag)                            \
974         vop_close(*(vp)->v_ops, vp, fflag)
975 #define VOP_ACCESS(vp, mode, cred)                      \
976         vop_access(*(vp)->v_ops, vp, mode, 0, cred)
977 #define VOP_ACCESS_FLAGS(vp, mode, flags, cred)         \
978         vop_access(*(vp)->v_ops, vp, mode, flags, cred)
979 #define VOP_GETATTR(vp, vap)                            \
980         vop_getattr(*(vp)->v_ops, vp, vap)
981 #define VOP_SETATTR(vp, vap, cred)                      \
982         vop_setattr(*(vp)->v_ops, vp, vap, cred)
983 #define VOP_READ(vp, uio, ioflag, cred)                 \
984         vop_read(*(vp)->v_ops, vp, uio, ioflag, cred)
985 #define VOP_WRITE(vp, uio, ioflag, cred)                \
986         vop_write(*(vp)->v_ops, vp, uio, ioflag, cred)
987 #define VOP_IOCTL(vp, command, data, fflag, cred)       \
988         vop_ioctl(*(vp)->v_ops, vp, command, data, fflag, cred)
989 #define VOP_POLL(vp, events, cred)                      \
990         vop_poll(*(vp)->v_ops, vp, events, cred)
991 #define VOP_KQFILTER(vp, kn)                            \
992         vop_kqfilter(*(vp)->v_ops, vp, kn)
993 #define VOP_MMAP(vp, fflags, cred)                      \
994         vop_mmap(*(vp)->v_ops, vp, fflags, cred)
995 #define VOP_FSYNC(vp, waitfor, flags)                   \
996         vop_fsync(*(vp)->v_ops, vp, waitfor, flags)
997 #define VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies)          \
998         vop_readdir(*(vp)->v_ops, vp, uio, cred, eofflag, ncookies, cookies)
999 #define VOP_READLINK(vp, uio, cred)                     \
1000         vop_readlink(*(vp)->v_ops, vp, uio, cred)
1001 #define VOP_INACTIVE(vp)                                \
1002         vop_inactive(*(vp)->v_ops, vp)
1003 #define VOP_RECLAIM(vp)                                 \
1004         vop_reclaim(*(vp)->v_ops, vp)
1005 #define VOP_BMAP(vp, loff, doffp, runp, runb, cmd)      \
1006         vop_bmap(*(vp)->v_ops, vp, loff, doffp, runp, runb, cmd)
1007 #define VOP_PRINT(vp)                                   \
1008         vop_print(*(vp)->v_ops, vp)
1009 #define VOP_PATHCONF(vp, name, retval)                  \
1010         vop_pathconf(*(vp)->v_ops, vp, name, retval)
1011 #define VOP_ADVLOCK(vp, id, op, fl, flags)              \
1012         vop_advlock(*(vp)->v_ops, vp, id, op, fl, flags)
1013 #define VOP_BALLOC(vp, offset, size, cred, flags, bpp)  \
1014         vop_balloc(*(vp)->v_ops, vp, offset, size, cred, flags, bpp)
1015 #define VOP_REALLOCBLKS(vp, buflist)                    \
1016         vop_reallocblks(*(vp)->v_ops, vp, buflist)
1017 #define VOP_GETPAGES(vp, m, count, reqpage, off)        \
1018         vop_getpages(*(vp)->v_ops, vp, m, count, reqpage, off)
1019 #define VOP_PUTPAGES(vp, m, count, sync, rtvals, off)   \
1020         vop_putpages(*(vp)->v_ops, vp, m, count, sync, rtvals, off)
1021 #define VOP_FREEBLKS(vp, offset, length)                \
1022         vop_freeblks(*(vp)->v_ops, vp, offset, length)
1023 #define VOP_GETACL(vp, type, aclp, cred)                \
1024         vop_getacl(*(vp)->v_ops, vp, type, aclp, cred)
1025 #define VOP_SETACL(vp, type, aclp, cred)                \
1026         vop_setacl(*(vp)->v_ops, vp, type, aclp, cred)
1027 #define VOP_ACLCHECK(vp, type, aclp, cred)              \
1028         vop_aclcheck(*(vp)->v_ops, vp, type, aclp, cred)
1029 #define VOP_GETEXTATTR(vp, name, uio, cred)             \
1030         vop_getextattr(*(vp)->v_ops, vp, name, uio, cred)
1031 #define VOP_SETEXTATTR(vp, name, uio, cred)             \
1032         vop_setextattr(*(vp)->v_ops, vp, name, uio, cred)
1033 #define VOP_MARKATIME(vp, cred)                 \
1034         vop_markatime(*(vp)->v_ops, vp, cred)
1035 /* no VOP_VFSSET() */
1036 /* VOP_STRATEGY - does not exist, use vn_strategy() */
1037
1038 /*
1039  * 'OLD' VOP calls.  These calls may only be made by the new API
1040  * compatibility functions in kern/vfs_default.c.  Attempting to
1041  * call these functions directly will confuse the namecache.  These
1042  * calls are deprecated and being removed from the system and from
1043  * the VFS's.
1044  */
1045 #define VOP_OLD_LOOKUP(dvp, vpp, cnp)                   \
1046         vop_old_lookup(*(dvp)->v_ops, dvp, vpp, cnp)
1047 #define VOP_OLD_CREATE(dvp, vpp, cnp, vap)              \
1048         vop_old_create(*(dvp)->v_ops, dvp, vpp, cnp, vap)
1049 #define VOP_OLD_MKDIR(dvp, vpp, cnp, vap)               \
1050         vop_old_mkdir(*(dvp)->v_ops, dvp, vpp, cnp, vap)
1051 #define VOP_OLD_MKNOD(dvp, vpp, cnp, vap)               \
1052         vop_old_mknod(*(dvp)->v_ops, dvp, vpp, cnp, vap)
1053 #define VOP_OLD_LINK(tdvp, vp, cnp)                     \
1054         vop_old_link(*(tdvp)->v_ops, tdvp, vp, cnp)
1055 #define VOP_OLD_SYMLINK(dvp, vpp, cnp, vap, target)     \
1056         vop_old_symlink(*(dvp)->v_ops, dvp, vpp, cnp, vap, target)
1057 #define VOP_OLD_WHITEOUT(dvp, cnp, flags)               \
1058         vop_old_whiteout(*(dvp)->v_ops, dvp, cnp, flags)
1059 #define VOP_OLD_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp) \
1060         vop_old_rename(*(fdvp)->v_ops, fdvp, fvp, fcnp, tdvp, tvp, tcnp)
1061 #define VOP_OLD_RMDIR(dvp, vp, cnp)                     \
1062         vop_old_rmdir(*(dvp)->v_ops, dvp, vp, cnp)
1063 #define VOP_OLD_REMOVE(dvp, vp, cnp)                    \
1064         vop_old_remove(*(dvp)->v_ops, dvp, vp, cnp)
1065
1066 /*
1067  * 'NEW' VOP calls.  These calls use namespaces as an operational basis
1068  * rather then vnodes and replace the OLD calls.   Eventually all VFS's
1069  * will support these calls.  Those that do not fall through to compatibility
1070  * code in kern/vfs_default which does the magic required to call the old
1071  * routines.
1072  */
1073 #define VOP_NRESOLVE(nch, dvp, cred)                    \
1074         vop_nresolve((nch)->mount->mnt_vn_use_ops, nch, dvp, cred)
1075 #define VOP_NLOOKUPDOTDOT(dvp, vpp, cred, fakename)     \
1076         vop_nlookupdotdot(*(dvp)->v_ops, dvp, vpp, cred, fakename)
1077 #define VOP_NCREATE(nch, dvp, vpp, cred, vap)           \
1078         vop_ncreate((nch)->mount->mnt_vn_use_ops, nch, dvp, vpp, cred, vap)
1079 #define VOP_NMKDIR(nch, dvp, vpp, cred, vap)            \
1080         vop_nmkdir((nch)->mount->mnt_vn_use_ops, nch, dvp, vpp, cred, vap)
1081 #define VOP_NMKNOD(nch, dvp, vpp, cred, vap)            \
1082         vop_nmknod((nch)->mount->mnt_vn_use_ops, nch, dvp, vpp, cred, vap)
1083 #define VOP_NLINK(nch, dvp, vp, cred)                   \
1084         vop_nlink((nch)->mount->mnt_vn_use_ops, nch, dvp, vp, cred)
1085 #define VOP_NSYMLINK(nch, dvp, vpp, cred, vap, target)  \
1086         vop_nsymlink((nch)->mount->mnt_vn_use_ops, nch, dvp, vpp, cred, vap, target)
1087 #define VOP_NWHITEOUT(nch, dvp, cred, flags)            \
1088         vop_nwhiteout((nch)->mount->mnt_vn_use_ops, nch, dvp, cred, flags)
1089 #define VOP_NRENAME(fnch, tnch, fdvp, tdvp, cred)               \
1090         vop_nrename((fnch)->mount->mnt_vn_use_ops, fnch, tnch, fdvp, tdvp, cred)
1091 #define VOP_NRMDIR(nch, dvp, cred)                      \
1092         vop_nrmdir((nch)->mount->mnt_vn_use_ops, nch, dvp, cred)
1093 #define VOP_NREMOVE(nch, dvp, cred)                     \
1094         vop_nremove((nch)->mount->mnt_vn_use_ops, nch, dvp, cred)
1095
1096 #endif
1097