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