]> git.saurik.com Git - apple/xnu.git/blame - bsd/vfs/vfs_support.c
xnu-792.10.96.tar.gz
[apple/xnu.git] / bsd / vfs / vfs_support.c
CommitLineData
1c79356b 1/*
91447636 2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
1c79356b
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
37839358
A
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
1c79356b 11 *
37839358
A
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1c79356b
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
37839358
A
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
1c79356b
A
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * Copyright (c) 1998-1999 Apple Computer, Inc. All rights reserved.
24 *
25 * File: vfs/vfs_support.c
26 *
27 * The default VFS routines. A VFS plugin can use these
28 * functions in case it does not want to implement all. These functions
29 * take care of releasing locks and free up memory that they are
30 * supposed to.
31 *
32 * nop_* routines always return 0 [success]
91447636 33 * err_* routines always return ENOTSUP
1c79356b
A
34 *
35 * This file could be auto-generated from vnode_if.src. but that needs
36 * support for freeing cnp.
37 *
38 * HISTORY
39 * 15-Jul-1998 Earsh Nandkeshwar (earsh@apple.com)
40 * Fixed up readdirattr for its existance now.
41 * 18-Aug-1998 Umesh Vaishampayan (umeshv@apple.com)
42 * Created.
43 */
44
45#include <vfs/vfs_support.h>
91447636 46#include <sys/kauth.h>
1c79356b
A
47
48
91447636 49struct vnop_create_args /* {
1c79356b
A
50 struct vnode *a_dvp;
51 struct vnode **a_vpp;
52 struct componentname *a_cnp;
91447636
A
53 struct vnode_vattr *a_vap;
54 vfs_context_t a_context;
1c79356b
A
55} */;
56
57int
91447636 58nop_create(struct vnop_create_args *ap)
1c79356b
A
59{
60#if DIAGNOSTIC
61 if ((ap->a_cnp->cn_flags & HASBUF) == 0)
62 panic("nop_create: no name");
63#endif
1c79356b
A
64 return (0);
65}
66
67int
91447636 68err_create(struct vnop_create_args *ap)
1c79356b
A
69{
70 (void)nop_create(ap);
91447636 71 return (ENOTSUP);
1c79356b
A
72}
73
74
91447636 75struct vnop_whiteout_args /* {
1c79356b
A
76 struct vnode *a_dvp;
77 struct componentname *a_cnp;
78 int a_flags;
91447636 79 vfs_context_t a_context;
1c79356b
A
80} */;
81
82int
91447636 83nop_whiteout(struct vnop_whiteout_args *ap)
1c79356b
A
84{
85 return (0);
86}
87
88int
91447636 89err_whiteout(struct vnop_whiteout_args *ap)
1c79356b 90{
91447636 91 return (ENOTSUP);
1c79356b
A
92}
93
94
91447636 95struct vnop_mknod_args /* {
1c79356b
A
96 struct vnode *a_dvp;
97 struct vnode **a_vpp;
98 struct componentname *a_cnp;
91447636
A
99 struct vnode_vattr *a_vap;
100 vfs_context_t a_context;
1c79356b
A
101} */;
102
103int
91447636 104nop_mknod(struct vnop_mknod_args *ap)
1c79356b
A
105{
106#if DIAGNOSTIC
107 if ((ap->a_cnp->cn_flags & HASBUF) == 0)
108 panic("nop_mknod: no name");
109#endif
1c79356b
A
110 return (0);
111}
112
113int
91447636 114err_mknod(struct vnop_mknod_args *ap)
1c79356b
A
115{
116 (void)nop_mknod(ap);
91447636 117 return (ENOTSUP);
1c79356b
A
118}
119
91447636 120struct vnop_open_args /* {
1c79356b
A
121 struct vnode *a_vp;
122 int a_mode;
91447636 123 vfs_context_t a_context;
1c79356b
A
124} */;
125
126int
91447636 127nop_open(struct vnop_open_args *ap)
1c79356b
A
128{
129 return (0);
130}
131
132int
91447636 133err_open(struct vnop_open_args *ap)
1c79356b 134{
91447636 135 return (ENOTSUP);
1c79356b
A
136}
137
138
91447636 139struct vnop_close_args /* {
1c79356b
A
140 struct vnode *a_vp;
141 int a_fflag;
91447636 142 vfs_context_t a_context;
1c79356b
A
143} */;
144
145int
91447636 146nop_close(struct vnop_close_args *ap)
1c79356b
A
147{
148 return (0);
149}
150
151int
91447636 152err_close(struct vnop_close_args *ap)
1c79356b 153{
91447636 154 return (ENOTSUP);
1c79356b
A
155}
156
157
91447636 158struct vnop_access_args /* {
1c79356b
A
159 struct vnode *a_vp;
160 int a_mode;
91447636 161 vfs_context_t a_context;
1c79356b
A
162} */;
163
164int
91447636 165nop_access(struct vnop_access_args *ap)
1c79356b
A
166{
167 return (0);
168}
169
170int
91447636 171err_access(struct vnop_access_args *ap)
1c79356b 172{
91447636 173 return (ENOTSUP);
1c79356b
A
174}
175
176
91447636 177struct vnop_getattr_args /* {
1c79356b 178 struct vnode *a_vp;
91447636
A
179 struct vnode_vattr *a_vap;
180 vfs_context_t a_context;
1c79356b
A
181} */;
182
183int
91447636 184nop_getattr(struct vnop_getattr_args *ap)
1c79356b
A
185{
186 return (0);
187}
188
189int
91447636 190err_getattr(struct vnop_getattr_args *ap)
1c79356b 191{
91447636 192 return (ENOTSUP);
1c79356b
A
193}
194
195
91447636 196struct vnop_setattr_args /* {
1c79356b 197 struct vnode *a_vp;
91447636
A
198 struct vnode_vattr *a_vap;
199 vfs_context_t a_context;
1c79356b
A
200} */;
201
202int
91447636 203nop_setattr(struct vnop_setattr_args *ap)
1c79356b
A
204{
205 return (0);
206}
207
208int
91447636 209err_setattr(struct vnop_setattr_args *ap)
1c79356b 210{
91447636 211 return (ENOTSUP);
1c79356b
A
212}
213
214
91447636 215struct vnop_getattrlist_args /* {
1c79356b
A
216 struct vnode *a_vp;
217 struct attrlist *a_alist;
218 struct uio *a_uio;
91447636
A
219 int a_options;
220 vfs_context a_context;
1c79356b
A
221} */;
222
223int
91447636 224nop_getattrlist(struct vnop_getattrlist_args *ap)
1c79356b
A
225{
226 return (0);
227}
228
229int
91447636 230err_getattrlist(struct vnop_getattrlist_args *ap)
1c79356b 231{
91447636 232 return (ENOTSUP);
1c79356b
A
233}
234
235
91447636 236struct vnop_setattrlist_args /* {
1c79356b
A
237 struct vnode *a_vp;
238 struct attrlist *a_alist;
239 struct uio *a_uio;
91447636
A
240 int a_options;
241 vfs_context_t a_context;
1c79356b
A
242} */;
243
244int
91447636 245nop_setattrlist(struct vnop_setattrlist_args *ap)
1c79356b
A
246{
247 return (0);
248}
249
250int
91447636 251err_setattrlist(struct vnop_setattrlist_args *ap)
1c79356b 252{
91447636 253 return (ENOTSUP);
1c79356b
A
254}
255
256
91447636 257struct vnop_read_args /* {
1c79356b
A
258 struct vnode *a_vp;
259 struct uio *a_uio;
260 int a_ioflag;
91447636 261 vfs_context_t a_context;
1c79356b
A
262} */;
263
264int
91447636 265nop_read(struct vnop_read_args *ap)
1c79356b
A
266{
267 return (0);
268}
269
270int
91447636 271err_read(struct vnop_read_args *ap)
1c79356b 272{
91447636 273 return (ENOTSUP);
1c79356b
A
274}
275
276
91447636 277struct vnop_write_args /* {
1c79356b
A
278 struct vnode *a_vp;
279 struct uio *a_uio;
280 int a_ioflag;
91447636 281 vfs_context_t a_context;
1c79356b
A
282} */;
283
284int
91447636 285nop_write(struct vnop_write_args *ap)
1c79356b
A
286{
287 return (0);
288}
289
290int
91447636 291err_write(struct vnop_write_args *ap)
1c79356b 292{
91447636 293 return (ENOTSUP);
1c79356b
A
294}
295
296
91447636 297struct vnop_ioctl_args /* {
1c79356b
A
298 struct vnode *a_vp;
299 u_long a_command;
300 caddr_t a_data;
301 int a_fflag;
91447636 302 kauth_cred_t a_cred;
1c79356b
A
303 struct proc *a_p;
304} */;
305
306int
91447636 307nop_ioctl(__unused struct vnop_ioctl_args *ap)
1c79356b
A
308{
309 return (0);
310}
311
312int
91447636 313err_ioctl(struct vnop_ioctl_args *ap)
1c79356b 314{
91447636 315 return (ENOTSUP);
1c79356b
A
316}
317
318
91447636 319struct vnop_select_args /* {
1c79356b
A
320 struct vnode *a_vp;
321 int a_which;
322 int a_fflags;
91447636 323 kauth_cred_t a_cred;
0b4e3aa0 324 void *a_wql;
1c79356b
A
325 struct proc *a_p;
326} */;
327
328int
91447636 329nop_select(__unused struct vnop_select_args *ap)
1c79356b
A
330{
331 return (0);
332}
333
334int
91447636 335err_select(struct vnop_select_args *ap)
1c79356b 336{
91447636 337 return (ENOTSUP);
1c79356b
A
338}
339
340
91447636 341struct vnop_exchange_args /* {
1c79356b
A
342 struct vnode *a_fvp;
343 struct vnode *a_tvp;
91447636
A
344 int a_options;
345 vfs_context_t a_context;
1c79356b
A
346} */;
347
348int
91447636 349nop_exchange(struct vnop_exchange_args *ap)
1c79356b
A
350{
351 return (0);
352}
353
354int
91447636 355err_exchange(struct vnop_exchange_args *ap)
1c79356b 356{
91447636 357 return (ENOTSUP);
1c79356b
A
358}
359
360
91447636 361struct vnop_revoke_args /* {
1c79356b
A
362 struct vnode *a_vp;
363 int a_flags;
91447636 364 vfs_context_t a_context;
1c79356b
A
365} */;
366
367int
91447636 368nop_revoke(struct vnop_revoke_args *ap)
1c79356b 369{
91447636 370 return vn_revoke(ap->a_vp, ap->a_flags, ap->a_context);
1c79356b
A
371}
372
373int
91447636 374err_revoke(struct vnop_revoke_args *ap)
1c79356b
A
375{
376 (void)nop_revoke(ap);
91447636 377 return (ENOTSUP);
1c79356b
A
378}
379
380
91447636 381struct vnop_mmap_args /* {
1c79356b
A
382 struct vnode *a_vp;
383 int a_fflags;
91447636 384 kauth_cred_t a_cred;
1c79356b
A
385 struct proc *a_p;
386} */;
387
388int
91447636 389nop_mmap(__unused struct vnop_mmap_args *ap)
1c79356b
A
390{
391 return (0);
392}
393
394int
91447636 395err_mmap(struct vnop_mmap_args *ap)
1c79356b 396{
91447636 397 return (ENOTSUP);
1c79356b
A
398}
399
400
91447636 401struct vnop_fsync_args /* {
1c79356b 402 struct vnode *a_vp;
1c79356b 403 int a_waitfor;
91447636 404 vfs_context_t a_context;
1c79356b
A
405} */;
406
407int
91447636 408nop_fsync(struct vnop_fsync_args *ap)
1c79356b
A
409{
410 return (0);
411}
412
413int
91447636 414err_fsync(struct vnop_fsync_args *ap)
1c79356b 415{
91447636 416 return (ENOTSUP);
1c79356b
A
417}
418
419
91447636 420struct vnop_remove_args /* {
1c79356b
A
421 struct vnode *a_dvp;
422 struct vnode *a_vp;
423 struct componentname *a_cnp;
91447636
A
424 int a_flags;
425 vfs_context_t a_context;
1c79356b
A
426} */;
427
428int
91447636 429nop_remove(struct vnop_remove_args *ap)
1c79356b 430{
1c79356b
A
431 return (0);
432}
433
434int
91447636 435err_remove(struct vnop_remove_args *ap)
1c79356b
A
436{
437 (void)nop_remove(ap);
91447636 438 return (ENOTSUP);
1c79356b
A
439}
440
441
91447636 442struct vnop_link_args /* {
1c79356b
A
443 struct vnode *a_vp;
444 struct vnode *a_tdvp;
445 struct componentname *a_cnp;
91447636 446 vfs_context_t a_context;
1c79356b
A
447} */;
448
449int
91447636 450nop_link(struct vnop_link_args *ap)
1c79356b 451{
1c79356b
A
452 return (0);
453}
454
455int
91447636 456err_link(struct vnop_link_args *ap)
1c79356b
A
457{
458 (void)nop_link(ap);
91447636 459 return (ENOTSUP);
1c79356b
A
460}
461
462
91447636 463struct vnop_rename_args /* {
1c79356b
A
464 struct vnode *a_fdvp;
465 struct vnode *a_fvp;
466 struct componentname *a_fcnp;
467 struct vnode *a_tdvp;
468 struct vnode *a_tvp;
469 struct componentname *a_tcnp;
91447636 470 vfs_context_t a_context;
1c79356b
A
471} */;
472
473int
91447636 474nop_rename(struct vnop_rename_args *ap)
1c79356b 475{
1c79356b
A
476 return (0);
477}
478
479int
91447636 480err_rename(struct vnop_rename_args *ap)
1c79356b
A
481{
482 (void)nop_rename(ap);
91447636 483 return (ENOTSUP);
1c79356b
A
484}
485
486
91447636 487struct vnop_mkdir_args /* {
1c79356b
A
488 struct vnode *a_dvp;
489 struct vnode **a_vpp;
490 struct componentname *a_cnp;
91447636
A
491 struct vnode_vattr *a_vap;
492 vfs_context_t a_context;
1c79356b
A
493} */;
494
495int
91447636 496nop_mkdir(struct vnop_mkdir_args *ap)
1c79356b 497{
1c79356b
A
498 return (0);
499}
500
501int
91447636 502err_mkdir(struct vnop_mkdir_args *ap)
1c79356b 503{
91447636 504 return (ENOTSUP);
1c79356b
A
505}
506
507
91447636 508struct vnop_rmdir_args /* {
1c79356b
A
509 struct vnode *a_dvp;
510 struct vnode *a_vp;
511 struct componentname *a_cnp;
91447636 512 vfs_context_t a_context;
1c79356b
A
513} */;
514
515int
91447636 516nop_rmdir(struct vnop_rmdir_args *ap)
1c79356b 517{
1c79356b
A
518 return (0);
519}
520
521int
91447636 522err_rmdir(struct vnop_rmdir_args *ap)
1c79356b
A
523{
524 (void)nop_rmdir(ap);
91447636 525 return (ENOTSUP);
1c79356b
A
526}
527
528
91447636 529struct vnop_symlink_args /* {
1c79356b
A
530 struct vnode *a_dvp;
531 struct vnode **a_vpp;
532 struct componentname *a_cnp;
91447636 533 struct vnode_vattr *a_vap;
1c79356b 534 char *a_target;
91447636 535 vfs_context_t a_context;
1c79356b
A
536} */;
537
538int
91447636 539nop_symlink(struct vnop_symlink_args *ap)
1c79356b
A
540{
541#if DIAGNOSTIC
542 if ((ap->a_cnp->cn_flags & HASBUF) == 0)
543 panic("nop_symlink: no name");
544#endif
1c79356b
A
545 return (0);
546}
547
548int
91447636 549err_symlink(struct vnop_symlink_args *ap)
1c79356b
A
550{
551 (void)nop_symlink(ap);
91447636 552 return (ENOTSUP);
1c79356b
A
553}
554
555
91447636
A
556struct vnop_readdir_args /* {
557 vnode_t a_vp;
1c79356b 558 struct uio *a_uio;
91447636 559 int a_flags;
1c79356b 560 int *a_eofflag;
91447636
A
561 int *a_numdirent;
562 vfs_context_t a_context;
1c79356b
A
563} */;
564
565int
91447636 566nop_readdir(struct vnop_readdir_args *ap)
1c79356b
A
567{
568 return (0);
569}
570
571int
91447636 572err_readdir(struct vnop_readdir_args *ap)
1c79356b 573{
91447636 574 return (ENOTSUP);
1c79356b
A
575}
576
577
91447636 578struct vnop_readdirattr_args /* {
1c79356b
A
579 struct vnode *a_vp;
580 struct attrlist *a_alist;
581 struct uio *a_uio;
582 u_long a_maxcount;
583 u_long a_options;
584 int *a_newstate;
585 int *a_eofflag;
586 u_long *a_actualcount;
91447636 587 vfs_context_t a_context;
1c79356b
A
588} */;
589
590int
91447636 591nop_readdirattr(struct vnop_readdirattr_args *ap)
1c79356b
A
592{
593 *(ap->a_actualcount) = 0;
594 *(ap->a_eofflag) = 0;
595 return (0);
596}
597
598int
91447636 599err_readdirattr(struct vnop_readdirattr_args *ap)
1c79356b
A
600{
601 (void)nop_readdirattr(ap);
91447636 602 return (ENOTSUP);
1c79356b
A
603}
604
605
91447636 606struct vnop_readlink_args /* {
1c79356b
A
607 struct vnode *vp;
608 struct uio *uio;
91447636 609 vfs_context_t a_context;
1c79356b
A
610} */;
611
612int
91447636 613nop_readlink(struct vnop_readlink_args *ap)
1c79356b 614{
1c79356b
A
615 return (0);
616}
617
618int
91447636 619err_readlink(struct vnop_readlink_args *ap)
1c79356b 620{
91447636 621 return (ENOTSUP);
1c79356b
A
622}
623
624
91447636 625struct vnop_inactive_args /* {
1c79356b 626 struct vnode *a_vp;
91447636 627 vfs_context_t a_context;
1c79356b
A
628} */;
629
630int
91447636 631nop_inactive(struct vnop_inactive_args *ap)
1c79356b 632{
1c79356b
A
633 return (0);
634}
635
636int
91447636 637err_inactive(struct vnop_inactive_args *ap)
1c79356b
A
638{
639 (void)nop_inactive(ap);
91447636 640 return (ENOTSUP);
1c79356b
A
641}
642
643
91447636 644struct vnop_reclaim_args /* {
1c79356b 645 struct vnode *a_vp;
91447636 646 vfs_context_t a_context;
1c79356b
A
647} */;
648
649int
91447636 650nop_reclaim(struct vnop_reclaim_args *ap)
1c79356b
A
651{
652 return (0);
653}
654
655int
91447636 656err_reclaim(struct vnop_reclaim_args *ap)
1c79356b 657{
91447636 658 return (ENOTSUP);
1c79356b
A
659}
660
661
91447636 662struct vnop_strategy_args /* {
1c79356b
A
663 struct buf *a_bp;
664} */;
665
666int
91447636 667nop_strategy(struct vnop_strategy_args *ap)
1c79356b
A
668{
669 return (0);
670}
671
672int
91447636 673err_strategy(struct vnop_strategy_args *ap)
1c79356b 674{
91447636 675 return (ENOTSUP);
1c79356b
A
676}
677
678
91447636 679struct vnop_pathconf_args /* {
1c79356b
A
680 struct vnode *a_vp;
681 int a_name;
682 register_t *a_retval;
91447636 683 vfs_context_t a_context;
1c79356b
A
684} */;
685
686int
91447636 687nop_pathconf(struct vnop_pathconf_args *ap)
1c79356b
A
688{
689 return (0);
690}
691
692int
91447636 693err_pathconf(struct vnop_pathconf_args *ap)
1c79356b 694{
91447636 695 return (ENOTSUP);
1c79356b
A
696}
697
698
91447636 699struct vnop_advlock_args /* {
1c79356b
A
700 struct vnode *a_vp;
701 caddr_t a_id;
702 int a_op;
703 struct flock *a_fl;
704 int a_flags;
91447636 705 vfs_context_t a_context;
1c79356b
A
706} */;
707
708int
91447636 709nop_advlock(struct vnop_advlock_args *ap)
1c79356b
A
710{
711 return (0);
712}
713
714int
91447636 715err_advlock(struct vnop_advlock_args *ap)
1c79356b 716{
91447636 717 return (ENOTSUP);
1c79356b
A
718}
719
720
1c79356b 721
91447636 722struct vnop_allocate_args /* {
1c79356b
A
723 struct vnode *a_vp;
724 off_t a_length;
725 u_int32_t a_flags;
726 off_t *a_bytesallocated;
0b4e3aa0 727 off_t a_offset;
91447636 728 vfs_context_t a_context;
1c79356b
A
729} */;
730
731int
91447636 732nop_allocate(struct vnop_allocate_args *ap)
1c79356b
A
733{
734 *(ap->a_bytesallocated) = 0;
735 return (0);
736}
737
738int
91447636 739err_allocate(struct vnop_allocate_args *ap)
1c79356b
A
740{
741 (void)nop_allocate(ap);
91447636 742 return (ENOTSUP);
1c79356b
A
743}
744
91447636 745struct vnop_bwrite_args /* {
1c79356b
A
746 struct buf *a_bp;
747} */;
748
749int
91447636 750nop_bwrite(struct vnop_bwrite_args *ap)
1c79356b 751{
91447636 752 return ((int)buf_bwrite(ap->a_bp));
1c79356b
A
753}
754
755int
91447636 756err_bwrite(struct vnop_bwrite_args *ap)
1c79356b 757{
91447636 758 return (ENOTSUP);
1c79356b
A
759}
760
761
91447636 762struct vnop_pagein_args /* {
1c79356b
A
763 struct vnode *a_vp,
764 upl_t a_pl,
765 vm_offset_t a_pl_offset,
766 off_t a_foffset,
767 size_t a_size,
1c79356b 768 int a_flags
91447636 769 vfs_context_t a_context;
1c79356b
A
770} */;
771
772int
91447636 773nop_pagein(struct vnop_pagein_args *ap)
1c79356b 774{
91447636
A
775 if ( !(ap->a_flags & UPL_NOCOMMIT))
776 ubc_upl_abort_range(ap->a_pl, ap->a_pl_offset, ap->a_size, UPL_ABORT_FREE_ON_EMPTY | UPL_ABORT_ERROR);
777 return (EINVAL);
1c79356b
A
778}
779
780int
91447636 781err_pagein(struct vnop_pagein_args *ap)
1c79356b 782{
91447636
A
783 if ( !(ap->a_flags & UPL_NOCOMMIT))
784 ubc_upl_abort_range(ap->a_pl, ap->a_pl_offset, ap->a_size, UPL_ABORT_FREE_ON_EMPTY | UPL_ABORT_ERROR);
785 return (ENOTSUP);
1c79356b
A
786}
787
788
91447636 789struct vnop_pageout_args /* {
1c79356b
A
790 struct vnode *a_vp,
791 upl_t a_pl,
792 vm_offset_t a_pl_offset,
793 off_t a_foffset,
794 size_t a_size,
1c79356b 795 int a_flags
91447636 796 vfs_context_t a_context;
1c79356b
A
797} */;
798
799int
91447636 800nop_pageout(struct vnop_pageout_args *ap)
1c79356b 801{
91447636
A
802 if ( !(ap->a_flags & UPL_NOCOMMIT))
803 ubc_upl_abort_range(ap->a_pl, ap->a_pl_offset, ap->a_size, UPL_ABORT_FREE_ON_EMPTY | UPL_ABORT_ERROR);
804 return (EINVAL);
1c79356b
A
805}
806
807int
91447636 808err_pageout(struct vnop_pageout_args *ap)
1c79356b 809{
91447636
A
810 if ( !(ap->a_flags & UPL_NOCOMMIT))
811 ubc_upl_abort_range(ap->a_pl, ap->a_pl_offset, ap->a_size, UPL_ABORT_FREE_ON_EMPTY | UPL_ABORT_ERROR);
812 return (ENOTSUP);
1c79356b
A
813}
814
815
91447636 816struct vnop_searchfs /* {
1c79356b
A
817 struct vnode *a_vp;
818 void *a_searchparams1;
819 void *a_searchparams2;
820 struct attrlist *a_searchattrs;
821 u_long a_maxmatches;
822 struct timeval *a_timelimit;
823 struct attrlist *a_returnattrs;
824 u_long *a_nummatches;
825 u_long a_scriptcode;
826 u_long a_options;
827 struct uio *a_uio;
828 struct searchstate *a_searchstate;
91447636 829 vfs_context_t a_context;
1c79356b
A
830} */;
831
832int
91447636 833nop_searchfs(struct vnop_searchfs_args *ap)
1c79356b
A
834{
835 *(ap->a_nummatches) = 0;
836 return (0);
837}
838
839int
91447636 840err_searchfs(struct vnop_searchfs_args *ap)
1c79356b
A
841{
842 (void)nop_searchfs(ap);
91447636 843 return (ENOTSUP);
1c79356b
A
844}
845
91447636 846struct vnop_copyfile_args /*{
1c79356b
A
847 struct vnodeop_desc *a_desc;
848 struct vnode *a_fvp;
849 struct vnode *a_tdvp;
850 struct vnode *a_tvp;
851 struct componentname *a_tcnp;
852 int a_flags;
853}*/;
854
855int
91447636 856nop_copyfile(struct vnop_copyfile_args *ap)
1c79356b 857{
1c79356b
A
858 return (0);
859}
860
861
862int
91447636 863err_copyfile(struct vnop_copyfile_args *ap)
1c79356b
A
864{
865 (void)nop_copyfile(ap);
91447636 866 return (ENOTSUP);
1c79356b
A
867}
868
869
91447636 870struct vnop_blktooff_args /* {
1c79356b 871 struct vnode *a_vp;
91447636 872 daddr64_t a_lblkno;
1c79356b
A
873 off_t *a_offset;
874} */;
875
876int
91447636 877nop_blktooff(struct vnop_blktooff_args *ap)
1c79356b
A
878{
879 *ap->a_offset = (off_t)-1; /* failure */
880 return (0);
881}
882
883int
91447636 884err_blktooff(struct vnop_blktooff_args *ap)
1c79356b
A
885{
886 (void)nop_blktooff(ap);
91447636 887 return (ENOTSUP);
1c79356b
A
888}
889
91447636 890struct vnop_offtoblk_args /* {
1c79356b
A
891 struct vnode *a_vp;
892 off_t a_offset;
91447636 893 daddr64_t *a_lblkno;
1c79356b
A
894} */;
895
896int
91447636 897nop_offtoblk(struct vnop_offtoblk_args *ap)
1c79356b 898{
91447636 899 *ap->a_lblkno = (daddr64_t)-1; /* failure */
1c79356b
A
900 return (0);
901}
902
903int
91447636 904err_offtoblk(struct vnop_offtoblk_args *ap)
1c79356b
A
905{
906 (void)nop_offtoblk(ap);
91447636 907 return (ENOTSUP);
1c79356b
A
908}
909
91447636 910struct vnop_blockmap_args /* {
1c79356b
A
911 struct vnode *a_vp;
912 off_t a_foffset;
913 size_t a_size;
91447636 914 daddr64_t *a_bpn;
1c79356b
A
915 size_t *a_run;
916 void *a_poff;
91447636 917 int a_flags;
1c79356b
A
918} */;
919
91447636 920int nop_blockmap(struct vnop_blockmap_args *ap)
1c79356b
A
921{
922 return (0);
923}
924
91447636 925int err_blockmap(struct vnop_blockmap_args *ap)
1c79356b 926{
91447636 927 return (ENOTSUP);
1c79356b
A
928}
929