1 /* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed 6 * to Berkeley by John Heidemann of the UCLA Ficus project. 7 * 8 * Source: * @(#)i405_init.c 2.10 92/04/27 UCLA Ficus project 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by the University of 21 * California, Berkeley and its contributors. 22 * 4. Neither the name of the University nor the names of its contributors 23 * may be used to endorse or promote products derived from this software 24 * without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * 39 * $FreeBSD$ 40 */ 41 42 #include <sys/param.h> 43 #include <sys/systm.h> 44 #include <sys/bio.h> 45 #include <sys/buf.h> 46 #include <sys/conf.h> 47 #include <sys/kernel.h> 48 #include <sys/lock.h> 49 #include <sys/malloc.h> 50 #include <sys/mount.h> 51 #include <sys/mutex.h> 52 #include <sys/unistd.h> 53 #include <sys/vnode.h> 54 #include <sys/poll.h> 55 56 #include <machine/limits.h> 57 58 #include <vm/vm.h> 59 #include <vm/vm_object.h> 60 #include <vm/vm_extern.h> 61 #include <vm/pmap.h> 62 #include <vm/vm_map.h> 63 #include <vm/vm_page.h> 64 #include <vm/vm_pager.h> 65 #include <vm/vnode_pager.h> 66 #include <vm/vm_zone.h> 67 68 static int vop_nolookup __P((struct vop_lookup_args *)); 69 static int vop_nostrategy __P((struct vop_strategy_args *)); 70 71 /* 72 * This vnode table stores what we want to do if the filesystem doesn't 73 * implement a particular VOP. 74 * 75 * If there is no specific entry here, we will return EOPNOTSUPP. 76 * 77 */ 78 79 vop_t **default_vnodeop_p; 80 static struct vnodeopv_entry_desc default_vnodeop_entries[] = { 81 { &vop_default_desc, (vop_t *) vop_eopnotsupp }, 82 { &vop_advlock_desc, (vop_t *) vop_einval }, 83 { &vop_bmap_desc, (vop_t *) vop_stdbmap }, 84 { &vop_close_desc, (vop_t *) vop_null }, 85 { &vop_createvobject_desc, (vop_t *) vop_stdcreatevobject }, 86 { &vop_destroyvobject_desc, (vop_t *) vop_stddestroyvobject }, 87 { &vop_fsync_desc, (vop_t *) vop_null }, 88 { &vop_getpages_desc, (vop_t *) vop_stdgetpages }, 89 { &vop_getvobject_desc, (vop_t *) vop_stdgetvobject }, 90 { &vop_inactive_desc, (vop_t *) vop_stdinactive }, 91 { &vop_ioctl_desc, (vop_t *) vop_enotty }, 92 { &vop_islocked_desc, (vop_t *) vop_noislocked }, 93 { &vop_lease_desc, (vop_t *) vop_null }, 94 { &vop_lock_desc, (vop_t *) vop_nolock }, 95 { &vop_lookup_desc, (vop_t *) vop_nolookup }, 96 { &vop_open_desc, (vop_t *) vop_null }, 97 { &vop_pathconf_desc, (vop_t *) vop_einval }, 98 { &vop_putpages_desc, (vop_t *) vop_stdputpages }, 99 { &vop_poll_desc, (vop_t *) vop_nopoll }, 100 { &vop_readlink_desc, (vop_t *) vop_einval }, 101 { &vop_revoke_desc, (vop_t *) vop_revoke }, 102 { &vop_strategy_desc, (vop_t *) vop_nostrategy }, 103 { &vop_unlock_desc, (vop_t *) vop_nounlock }, 104 { NULL, NULL } 105 }; 106 107 static struct vnodeopv_desc default_vnodeop_opv_desc = 108 { &default_vnodeop_p, default_vnodeop_entries }; 109 110 VNODEOP_SET(default_vnodeop_opv_desc); 111 112 int 113 vop_eopnotsupp(struct vop_generic_args *ap) 114 { 115 /* 116 printf("vop_notsupp[%s]\n", ap->a_desc->vdesc_name); 117 */ 118 119 return (EOPNOTSUPP); 120 } 121 122 int 123 vop_ebadf(struct vop_generic_args *ap) 124 { 125 126 return (EBADF); 127 } 128 129 int 130 vop_enotty(struct vop_generic_args *ap) 131 { 132 133 return (ENOTTY); 134 } 135 136 int 137 vop_einval(struct vop_generic_args *ap) 138 { 139 140 return (EINVAL); 141 } 142 143 int 144 vop_null(struct vop_generic_args *ap) 145 { 146 147 return (0); 148 } 149 150 int 151 vop_defaultop(struct vop_generic_args *ap) 152 { 153 154 return (VOCALL(default_vnodeop_p, ap->a_desc->vdesc_offset, ap)); 155 } 156 157 int 158 vop_panic(struct vop_generic_args *ap) 159 { 160 161 panic("filesystem goof: vop_panic[%s]", ap->a_desc->vdesc_name); 162 } 163 164 static int 165 vop_nolookup(ap) 166 struct vop_lookup_args /* { 167 struct vnode *a_dvp; 168 struct vnode **a_vpp; 169 struct componentname *a_cnp; 170 } */ *ap; 171 { 172 173 *ap->a_vpp = NULL; 174 return (ENOTDIR); 175 } 176 177 /* 178 * vop_nostrategy: 179 * 180 * Strategy routine for VFS devices that have none. 181 * 182 * BIO_ERROR and B_INVAL must be cleared prior to calling any strategy 183 * routine. Typically this is done for a BIO_READ strategy call. 184 * Typically B_INVAL is assumed to already be clear prior to a write 185 * and should not be cleared manually unless you just made the buffer 186 * invalid. BIO_ERROR should be cleared either way. 187 */ 188 189 static int 190 vop_nostrategy (struct vop_strategy_args *ap) 191 { 192 printf("No strategy for buffer at %p\n", ap->a_bp); 193 vprint("", ap->a_vp); 194 vprint("", ap->a_bp->b_vp); 195 ap->a_bp->b_ioflags |= BIO_ERROR; 196 ap->a_bp->b_error = EOPNOTSUPP; 197 bufdone(ap->a_bp); 198 return (EOPNOTSUPP); 199 } 200 201 int 202 vop_stdpathconf(ap) 203 struct vop_pathconf_args /* { 204 struct vnode *a_vp; 205 int a_name; 206 int *a_retval; 207 } */ *ap; 208 { 209 210 switch (ap->a_name) { 211 case _PC_LINK_MAX: 212 *ap->a_retval = LINK_MAX; 213 return (0); 214 case _PC_MAX_CANON: 215 *ap->a_retval = MAX_CANON; 216 return (0); 217 case _PC_MAX_INPUT: 218 *ap->a_retval = MAX_INPUT; 219 return (0); 220 case _PC_PIPE_BUF: 221 *ap->a_retval = PIPE_BUF; 222 return (0); 223 case _PC_CHOWN_RESTRICTED: 224 *ap->a_retval = 1; 225 return (0); 226 case _PC_VDISABLE: 227 *ap->a_retval = _POSIX_VDISABLE; 228 return (0); 229 default: 230 return (EINVAL); 231 } 232 /* NOTREACHED */ 233 } 234 235 /* 236 * Standard lock, unlock and islocked functions. 237 * 238 * These depend on the lock structure being the first element in the 239 * inode, ie: vp->v_data points to the the lock! 240 */ 241 int 242 vop_stdlock(ap) 243 struct vop_lock_args /* { 244 struct vnode *a_vp; 245 int a_flags; 246 struct proc *a_p; 247 } */ *ap; 248 { 249 struct vnode *vp = ap->a_vp; 250 251 #ifndef DEBUG_LOCKS 252 return (lockmgr(&vp->v_lock, ap->a_flags, &vp->v_interlock, ap->a_p)); 253 #else 254 return (debuglockmgr(&vp->v_lock, ap->a_flags, &vp->v_interlock, 255 ap->a_p, "vop_stdlock", vp->filename, vp->line)); 256 #endif 257 } 258 259 int 260 vop_stdunlock(ap) 261 struct vop_unlock_args /* { 262 struct vnode *a_vp; 263 int a_flags; 264 struct proc *a_p; 265 } */ *ap; 266 { 267 struct vnode *vp = ap->a_vp; 268 269 return (lockmgr(&vp->v_lock, ap->a_flags | LK_RELEASE, &vp->v_interlock, 270 ap->a_p)); 271 } 272 273 int 274 vop_stdislocked(ap) 275 struct vop_islocked_args /* { 276 struct vnode *a_vp; 277 struct proc *a_p; 278 } */ *ap; 279 { 280 281 return (lockstatus(&ap->a_vp->v_lock, ap->a_p)); 282 } 283 284 int 285 vop_stdinactive(ap) 286 struct vop_inactive_args /* { 287 struct vnode *a_vp; 288 struct proc *a_p; 289 } */ *ap; 290 { 291 292 VOP_UNLOCK(ap->a_vp, 0, ap->a_p); 293 return (0); 294 } 295 296 /* 297 * Return true for select/poll. 298 */ 299 int 300 vop_nopoll(ap) 301 struct vop_poll_args /* { 302 struct vnode *a_vp; 303 int a_events; 304 struct ucred *a_cred; 305 struct proc *a_p; 306 } */ *ap; 307 { 308 /* 309 * Return true for read/write. If the user asked for something 310 * special, return POLLNVAL, so that clients have a way of 311 * determining reliably whether or not the extended 312 * functionality is present without hard-coding knowledge 313 * of specific filesystem implementations. 314 */ 315 if (ap->a_events & ~POLLSTANDARD) 316 return (POLLNVAL); 317 318 return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)); 319 } 320 321 /* 322 * Implement poll for local filesystems that support it. 323 */ 324 int 325 vop_stdpoll(ap) 326 struct vop_poll_args /* { 327 struct vnode *a_vp; 328 int a_events; 329 struct ucred *a_cred; 330 struct proc *a_p; 331 } */ *ap; 332 { 333 if (ap->a_events & ~POLLSTANDARD) 334 return (vn_pollrecord(ap->a_vp, ap->a_p, ap->a_events)); 335 return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)); 336 } 337 338 /* 339 * Stubs to use when there is no locking to be done on the underlying object. 340 * A minimal shared lock is necessary to ensure that the underlying object 341 * is not revoked while an operation is in progress. So, an active shared 342 * count is maintained in an auxillary vnode lock structure. 343 */ 344 int 345 vop_sharedlock(ap) 346 struct vop_lock_args /* { 347 struct vnode *a_vp; 348 int a_flags; 349 struct proc *a_p; 350 } */ *ap; 351 { 352 /* 353 * This code cannot be used until all the non-locking filesystems 354 * (notably NFS) are converted to properly lock and release nodes. 355 * Also, certain vnode operations change the locking state within 356 * the operation (create, mknod, remove, link, rename, mkdir, rmdir, 357 * and symlink). Ideally these operations should not change the 358 * lock state, but should be changed to let the caller of the 359 * function unlock them. Otherwise all intermediate vnode layers 360 * (such as union, umapfs, etc) must catch these functions to do 361 * the necessary locking at their layer. Note that the inactive 362 * and lookup operations also change their lock state, but this 363 * cannot be avoided, so these two operations will always need 364 * to be handled in intermediate layers. 365 */ 366 struct vnode *vp = ap->a_vp; 367 int vnflags, flags = ap->a_flags; 368 369 switch (flags & LK_TYPE_MASK) { 370 case LK_DRAIN: 371 vnflags = LK_DRAIN; 372 break; 373 case LK_EXCLUSIVE: 374 #ifdef DEBUG_VFS_LOCKS 375 /* 376 * Normally, we use shared locks here, but that confuses 377 * the locking assertions. 378 */ 379 vnflags = LK_EXCLUSIVE; 380 break; 381 #endif 382 case LK_SHARED: 383 vnflags = LK_SHARED; 384 break; 385 case LK_UPGRADE: 386 case LK_EXCLUPGRADE: 387 case LK_DOWNGRADE: 388 return (0); 389 case LK_RELEASE: 390 default: 391 panic("vop_sharedlock: bad operation %d", flags & LK_TYPE_MASK); 392 } 393 if (flags & LK_INTERLOCK) 394 vnflags |= LK_INTERLOCK; 395 #ifndef DEBUG_LOCKS 396 return (lockmgr(&vp->v_lock, vnflags, &vp->v_interlock, ap->a_p)); 397 #else 398 return (debuglockmgr(&vp->v_lock, vnflags, &vp->v_interlock, ap->a_p, 399 "vop_sharedlock", vp->filename, vp->line)); 400 #endif 401 } 402 403 /* 404 * Stubs to use when there is no locking to be done on the underlying object. 405 * A minimal shared lock is necessary to ensure that the underlying object 406 * is not revoked while an operation is in progress. So, an active shared 407 * count is maintained in an auxillary vnode lock structure. 408 */ 409 int 410 vop_nolock(ap) 411 struct vop_lock_args /* { 412 struct vnode *a_vp; 413 int a_flags; 414 struct proc *a_p; 415 } */ *ap; 416 { 417 #ifdef notyet 418 /* 419 * This code cannot be used until all the non-locking filesystems 420 * (notably NFS) are converted to properly lock and release nodes. 421 * Also, certain vnode operations change the locking state within 422 * the operation (create, mknod, remove, link, rename, mkdir, rmdir, 423 * and symlink). Ideally these operations should not change the 424 * lock state, but should be changed to let the caller of the 425 * function unlock them. Otherwise all intermediate vnode layers 426 * (such as union, umapfs, etc) must catch these functions to do 427 * the necessary locking at their layer. Note that the inactive 428 * and lookup operations also change their lock state, but this 429 * cannot be avoided, so these two operations will always need 430 * to be handled in intermediate layers. 431 */ 432 struct vnode *vp = ap->a_vp; 433 int vnflags, flags = ap->a_flags; 434 435 switch (flags & LK_TYPE_MASK) { 436 case LK_DRAIN: 437 vnflags = LK_DRAIN; 438 break; 439 case LK_EXCLUSIVE: 440 case LK_SHARED: 441 vnflags = LK_SHARED; 442 break; 443 case LK_UPGRADE: 444 case LK_EXCLUPGRADE: 445 case LK_DOWNGRADE: 446 return (0); 447 case LK_RELEASE: 448 default: 449 panic("vop_nolock: bad operation %d", flags & LK_TYPE_MASK); 450 } 451 if (flags & LK_INTERLOCK) 452 vnflags |= LK_INTERLOCK; 453 return(lockmgr(&vp->v_lock, vnflags, &vp->v_interlock, ap->a_p)); 454 #else /* for now */ 455 /* 456 * Since we are not using the lock manager, we must clear 457 * the interlock here. 458 */ 459 if (ap->a_flags & LK_INTERLOCK) 460 mtx_unlock(&ap->a_vp->v_interlock); 461 return (0); 462 #endif 463 } 464 465 /* 466 * Do the inverse of vop_nolock, handling the interlock in a compatible way. 467 */ 468 int 469 vop_nounlock(ap) 470 struct vop_unlock_args /* { 471 struct vnode *a_vp; 472 int a_flags; 473 struct proc *a_p; 474 } */ *ap; 475 { 476 477 /* 478 * Since we are not using the lock manager, we must clear 479 * the interlock here. 480 */ 481 if (ap->a_flags & LK_INTERLOCK) 482 mtx_unlock(&ap->a_vp->v_interlock); 483 return (0); 484 } 485 486 /* 487 * Return whether or not the node is in use. 488 */ 489 int 490 vop_noislocked(ap) 491 struct vop_islocked_args /* { 492 struct vnode *a_vp; 493 struct proc *a_p; 494 } */ *ap; 495 { 496 497 return (0); 498 } 499 500 /* 501 * Return our mount point, as we will take charge of the writes. 502 */ 503 int 504 vop_stdgetwritemount(ap) 505 struct vop_getwritemount_args /* { 506 struct vnode *a_vp; 507 struct mount **a_mpp; 508 } */ *ap; 509 { 510 511 *(ap->a_mpp) = ap->a_vp->v_mount; 512 return (0); 513 } 514 515 int 516 vop_stdcreatevobject(ap) 517 struct vop_createvobject_args /* { 518 struct vnode *vp; 519 struct ucred *cred; 520 struct proc *p; 521 } */ *ap; 522 { 523 struct vnode *vp = ap->a_vp; 524 struct ucred *cred = ap->a_cred; 525 struct proc *p = ap->a_p; 526 struct vattr vat; 527 vm_object_t object; 528 int error = 0; 529 530 if (!vn_isdisk(vp, NULL) && vn_canvmio(vp) == FALSE) 531 return (0); 532 533 retry: 534 if ((object = vp->v_object) == NULL) { 535 if (vp->v_type == VREG || vp->v_type == VDIR) { 536 if ((error = VOP_GETATTR(vp, &vat, cred, p)) != 0) 537 goto retn; 538 mtx_lock(&vm_mtx); 539 object = vnode_pager_alloc(vp, vat.va_size, 0, 0); 540 } else if (devsw(vp->v_rdev) != NULL) { 541 /* 542 * This simply allocates the biggest object possible 543 * for a disk vnode. This should be fixed, but doesn't 544 * cause any problems (yet). 545 */ 546 mtx_lock(&vm_mtx); 547 object = vnode_pager_alloc(vp, IDX_TO_OFF(INT_MAX), 0, 0); 548 } else { 549 goto retn; 550 } 551 /* 552 * Dereference the reference we just created. This assumes 553 * that the object is associated with the vp. 554 */ 555 object->ref_count--; 556 mtx_unlock(&vm_mtx); 557 vp->v_usecount--; 558 } else { 559 /* 560 * XXX: safe to hold vm mutex through VOP_UNLOCK? 561 */ 562 mtx_lock(&vm_mtx); 563 if (object->flags & OBJ_DEAD) { 564 VOP_UNLOCK(vp, 0, p); 565 msleep(object, VM_OBJECT_MTX(object), PVM, "vodead", 0); 566 mtx_unlock(&vm_mtx); 567 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); 568 goto retry; 569 } 570 mtx_unlock(&vm_mtx); 571 } 572 573 KASSERT(vp->v_object != NULL, ("vfs_object_create: NULL object")); 574 vp->v_flag |= VOBJBUF; 575 576 retn: 577 return (error); 578 } 579 580 int 581 vop_stddestroyvobject(ap) 582 struct vop_destroyvobject_args /* { 583 struct vnode *vp; 584 } */ *ap; 585 { 586 struct vnode *vp = ap->a_vp; 587 vm_object_t obj = vp->v_object; 588 589 if (vp->v_object == NULL) 590 return (0); 591 592 mtx_lock(&vm_mtx); 593 if (obj->ref_count == 0) { 594 /* 595 * vclean() may be called twice. The first time 596 * removes the primary reference to the object, 597 * the second time goes one further and is a 598 * special-case to terminate the object. 599 */ 600 vm_object_terminate(obj); 601 } else { 602 /* 603 * Woe to the process that tries to page now :-). 604 */ 605 vm_pager_deallocate(obj); 606 } 607 mtx_unlock(&vm_mtx); 608 return (0); 609 } 610 611 int 612 vop_stdgetvobject(ap) 613 struct vop_getvobject_args /* { 614 struct vnode *vp; 615 struct vm_object **objpp; 616 } */ *ap; 617 { 618 struct vnode *vp = ap->a_vp; 619 struct vm_object **objpp = ap->a_objpp; 620 621 if (objpp) 622 *objpp = vp->v_object; 623 return (vp->v_object ? 0 : EINVAL); 624 } 625 626 int 627 vop_stdbmap(ap) 628 struct vop_bmap_args /* { 629 struct vnode *a_vp; 630 daddr_t a_bn; 631 struct vnode **a_vpp; 632 daddr_t *a_bnp; 633 int *a_runp; 634 int *a_runb; 635 } */ *ap; 636 { 637 638 if (ap->a_vpp != NULL) 639 *ap->a_vpp = ap->a_vp; 640 if (ap->a_bnp != NULL) 641 *ap->a_bnp = ap->a_bn * btodb(ap->a_vp->v_mount->mnt_stat.f_iosize); 642 if (ap->a_runp != NULL) 643 *ap->a_runp = 0; 644 if (ap->a_runb != NULL) 645 *ap->a_runb = 0; 646 return (0); 647 } 648 649 int 650 vop_stdgetpages(ap) 651 struct vop_getpages_args /* { 652 struct vnode *a_vp; 653 vm_page_t *a_m; 654 int a_count; 655 int a_reqpage; 656 vm_ooffset_t a_offset; 657 } */ *ap; 658 { 659 660 return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, 661 ap->a_count, ap->a_reqpage); 662 } 663 664 int 665 vop_stdputpages(ap) 666 struct vop_putpages_args /* { 667 struct vnode *a_vp; 668 vm_page_t *a_m; 669 int a_count; 670 int a_sync; 671 int *a_rtvals; 672 vm_ooffset_t a_offset; 673 } */ *ap; 674 { 675 676 return vnode_pager_generic_putpages(ap->a_vp, ap->a_m, ap->a_count, 677 ap->a_sync, ap->a_rtvals); 678 } 679 680 681 682 /* 683 * vfs default ops 684 * used to fill the vfs fucntion table to get reasonable default return values. 685 */ 686 int 687 vfs_stdmount (mp, path, data, ndp, p) 688 struct mount *mp; 689 char *path; 690 caddr_t data; 691 struct nameidata *ndp; 692 struct proc *p; 693 { 694 return (0); 695 } 696 697 int 698 vfs_stdunmount (mp, mntflags, p) 699 struct mount *mp; 700 int mntflags; 701 struct proc *p; 702 { 703 return (0); 704 } 705 706 int 707 vfs_stdroot (mp, vpp) 708 struct mount *mp; 709 struct vnode **vpp; 710 { 711 return (EOPNOTSUPP); 712 } 713 714 int 715 vfs_stdstatfs (mp, sbp, p) 716 struct mount *mp; 717 struct statfs *sbp; 718 struct proc *p; 719 { 720 return (EOPNOTSUPP); 721 } 722 723 int 724 vfs_stdvptofh (vp, fhp) 725 struct vnode *vp; 726 struct fid *fhp; 727 { 728 return (EOPNOTSUPP); 729 } 730 731 int 732 vfs_stdstart (mp, flags, p) 733 struct mount *mp; 734 int flags; 735 struct proc *p; 736 { 737 return (0); 738 } 739 740 int 741 vfs_stdquotactl (mp, cmds, uid, arg, p) 742 struct mount *mp; 743 int cmds; 744 uid_t uid; 745 caddr_t arg; 746 struct proc *p; 747 { 748 return (EOPNOTSUPP); 749 } 750 751 int 752 vfs_stdsync (mp, waitfor, cred, p) 753 struct mount *mp; 754 int waitfor; 755 struct ucred *cred; 756 struct proc *p; 757 { 758 return (0); 759 } 760 761 int 762 vfs_stdvget (mp, ino, vpp) 763 struct mount *mp; 764 ino_t ino; 765 struct vnode **vpp; 766 { 767 return (EOPNOTSUPP); 768 } 769 770 int 771 vfs_stdfhtovp (mp, fhp, vpp) 772 struct mount *mp; 773 struct fid *fhp; 774 struct vnode **vpp; 775 { 776 return (EOPNOTSUPP); 777 } 778 779 int 780 vfs_stdinit (vfsp) 781 struct vfsconf *vfsp; 782 { 783 return (0); 784 } 785 786 int 787 vfs_stduninit (vfsp) 788 struct vfsconf *vfsp; 789 { 790 return(0); 791 } 792 793 int 794 vfs_stdextattrctl(mp, cmd, filename_vp, attrnamespace, attrname, p) 795 struct mount *mp; 796 int cmd; 797 struct vnode *filename_vp; 798 int attrnamespace; 799 const char *attrname; 800 struct proc *p; 801 { 802 return(EOPNOTSUPP); 803 } 804 805 /* end of vfs default ops */ 806