Lines Matching refs:mp
203 VFS_MOUNT(mount_t mp, vnode_t devvp, user_addr_t data, vfs_context_t ctx)
209 if ((mp == dead_mountp) || (mp->mnt_op->vfs_mount == 0))
212 thread_safe = mp->mnt_vtable->vfc_threadsafe;
220 if (vfs_64bitready(mp)) {
221 error = (*mp->mnt_op->vfs_mount)(mp, devvp, data, ctx);
228 error = (*mp->mnt_op->vfs_mount)(mp, devvp, data, ctx);
238 VFS_START(mount_t mp, int flags, vfs_context_t ctx)
244 if ((mp == dead_mountp) || (mp->mnt_op->vfs_start == 0))
247 thread_safe = mp->mnt_vtable->vfc_threadsafe;
252 error = (*mp->mnt_op->vfs_start)(mp, flags, ctx);
260 VFS_UNMOUNT(mount_t mp, int flags, vfs_context_t ctx)
266 if ((mp == dead_mountp) || (mp->mnt_op->vfs_unmount == 0))
269 thread_safe = mp->mnt_vtable->vfc_threadsafe;
274 error = (*mp->mnt_op->vfs_unmount)(mp, flags, ctx);
299 VFS_ROOT(mount_t mp, struct vnode ** vpp, vfs_context_t ctx)
305 if ((mp == dead_mountp) || (mp->mnt_op->vfs_root == 0))
311 thread_safe = mp->mnt_vtable->vfc_threadsafe;
316 error = (*mp->mnt_op->vfs_root)(mp, vpp, ctx);
324 VFS_QUOTACTL(mount_t mp, int cmd, uid_t uid, caddr_t datap, vfs_context_t ctx)
330 if ((mp == dead_mountp) || (mp->mnt_op->vfs_quotactl == 0))
333 thread_safe = mp->mnt_vtable->vfc_threadsafe;
338 error = (*mp->mnt_op->vfs_quotactl)(mp, cmd, uid, datap, ctx);
346 VFS_GETATTR(mount_t mp, struct vfs_attr *vfa, vfs_context_t ctx)
352 if ((mp == dead_mountp) || (mp->mnt_op->vfs_getattr == 0))
359 thread_safe = mp->mnt_vtable->vfc_threadsafe;
364 error = (*mp->mnt_op->vfs_getattr)(mp, vfa, ctx);
372 VFS_SETATTR(mount_t mp, struct vfs_attr *vfa, vfs_context_t ctx)
378 if ((mp == dead_mountp) || (mp->mnt_op->vfs_setattr == 0))
385 thread_safe = mp->mnt_vtable->vfc_threadsafe;
390 error = (*mp->mnt_op->vfs_setattr)(mp, vfa, ctx);
398 VFS_SYNC(mount_t mp, int flags, vfs_context_t ctx)
404 if ((mp == dead_mountp) || (mp->mnt_op->vfs_sync == 0))
410 thread_safe = mp->mnt_vtable->vfc_threadsafe;
415 error = (*mp->mnt_op->vfs_sync)(mp, flags, ctx);
423 VFS_VGET(mount_t mp, ino64_t ino, struct vnode **vpp, vfs_context_t ctx)
429 if ((mp == dead_mountp) || (mp->mnt_op->vfs_vget == 0))
435 thread_safe = mp->mnt_vtable->vfc_threadsafe;
440 error = (*mp->mnt_op->vfs_vget)(mp, ino, vpp, ctx);
448 VFS_FHTOVP(mount_t mp, int fhlen, unsigned char * fhp, vnode_t * vpp, vfs_context_t ctx)
454 if ((mp == dead_mountp) || (mp->mnt_op->vfs_fhtovp == 0))
460 thread_safe = mp->mnt_vtable->vfc_threadsafe;
465 error = (*mp->mnt_op->vfs_fhtovp)(mp, fhlen, fhp, vpp, ctx);
500 vfs_name(mount_t mp, char * buffer)
502 strncpy(buffer, mp->mnt_vtable->vfc_name, MFSNAMELEN);
507 vfs_typenum(mount_t mp)
509 return(mp->mnt_vtable->vfc_typenum);
515 vfs_flags(mount_t mp)
517 return((uint64_t)(mp->mnt_flag & (MNT_CMDFLAGS | MNT_VISFLAGMASK)));
522 vfs_setflags(mount_t mp, uint64_t flags)
526 mount_lock(mp);
527 mp->mnt_flag |= lflags;
528 mount_unlock(mp);
533 vfs_clearflags(mount_t mp , uint64_t flags)
537 mount_lock(mp);
538 mp->mnt_flag &= ~lflags;
539 mount_unlock(mp);
544 vfs_iswriteupgrade(mount_t mp) /* ronly && MNTK_WANTRDWR */
546 return ((mp->mnt_flag & MNT_RDONLY) && (mp->mnt_kern_flag & MNTK_WANTRDWR));
552 vfs_isrdonly(mount_t mp)
554 return (mp->mnt_flag & MNT_RDONLY);
559 vfs_issynchronous(mount_t mp)
561 return (mp->mnt_flag & MNT_SYNCHRONOUS);
566 vfs_isrdwr(mount_t mp)
568 return ((mp->mnt_flag & MNT_RDONLY) == 0);
574 vfs_isupdate(mount_t mp)
576 return (mp->mnt_flag & MNT_UPDATE);
582 vfs_isreload(mount_t mp)
584 return ((mp->mnt_flag & MNT_UPDATE) && (mp->mnt_flag & MNT_RELOAD));
589 vfs_isforce(mount_t mp)
591 if ((mp->mnt_lflag & MNT_LFORCE) || (mp->mnt_kern_flag & MNTK_FRCUNMOUNT))
598 vfs_64bitready(mount_t mp)
600 if ((mp->mnt_vtable->vfc_64bitready))
608 vfs_authcache_ttl(mount_t mp)
610 if ( (mp->mnt_kern_flag & (MNTK_AUTH_OPAQUE | MNTK_AUTH_CACHE_TTL)) )
611 return (mp->mnt_authcache_ttl);
617 vfs_setauthcache_ttl(mount_t mp, int ttl)
619 mount_lock(mp);
620 mp->mnt_kern_flag |= MNTK_AUTH_CACHE_TTL;
621 mp->mnt_authcache_ttl = ttl;
622 mount_unlock(mp);
626 vfs_clearauthcache_ttl(mount_t mp)
628 mount_lock(mp);
629 mp->mnt_kern_flag &= ~MNTK_AUTH_CACHE_TTL;
634 mp->mnt_authcache_ttl = CACHED_LOOKUP_RIGHT_TTL;
635 mount_unlock(mp);
639 vfs_markdependency(mount_t mp)
642 mount_lock(mp);
643 mp->mnt_dependent_process = p;
644 mp->mnt_dependent_pid = proc_pid(p);
645 mount_unlock(mp);
650 vfs_authopaque(mount_t mp)
652 if ((mp->mnt_kern_flag & MNTK_AUTH_OPAQUE))
659 vfs_authopaqueaccess(mount_t mp)
661 if ((mp->mnt_kern_flag & MNTK_AUTH_OPAQUE_ACCESS))
668 vfs_setauthopaque(mount_t mp)
670 mount_lock(mp);
671 mp->mnt_kern_flag |= MNTK_AUTH_OPAQUE;
672 mount_unlock(mp);
676 vfs_setauthopaqueaccess(mount_t mp)
678 mount_lock(mp);
679 mp->mnt_kern_flag |= MNTK_AUTH_OPAQUE_ACCESS;
680 mount_unlock(mp);
684 vfs_clearauthopaque(mount_t mp)
686 mount_lock(mp);
687 mp->mnt_kern_flag &= ~MNTK_AUTH_OPAQUE;
688 mount_unlock(mp);
692 vfs_clearauthopaqueaccess(mount_t mp)
694 mount_lock(mp);
695 mp->mnt_kern_flag &= ~MNTK_AUTH_OPAQUE_ACCESS;
696 mount_unlock(mp);
700 vfs_setextendedsecurity(mount_t mp)
702 mount_lock(mp);
703 mp->mnt_kern_flag |= MNTK_EXTENDED_SECURITY;
704 mount_unlock(mp);
708 vfs_clearextendedsecurity(mount_t mp)
710 mount_lock(mp);
711 mp->mnt_kern_flag &= ~MNTK_EXTENDED_SECURITY;
712 mount_unlock(mp);
716 vfs_extendedsecurity(mount_t mp)
718 return(mp->mnt_kern_flag & MNTK_EXTENDED_SECURITY);
723 vfs_maxsymlen(mount_t mp)
725 return(mp->mnt_maxsymlinklen);
730 vfs_setmaxsymlen(mount_t mp, uint32_t symlen)
732 mp->mnt_maxsymlinklen = symlen;
737 vfs_statfs(mount_t mp)
739 return(&mp->mnt_vfsstat);
743 vfs_getattr(mount_t mp, struct vfs_attr *vfa, vfs_context_t ctx)
747 if ((error = VFS_GETATTR(mp, vfa, ctx)) != 0)
762 vfs_setattr(mount_t mp, struct vfs_attr *vfa, vfs_context_t ctx)
766 if (vfs_isrdonly(mp))
769 error = VFS_SETATTR(mp, vfa, ctx);
781 vfs_fsprivate(mount_t mp)
783 return(mp->mnt_data);
788 vfs_setfsprivate(mount_t mp, void *mntdata)
790 mount_lock(mp);
791 mp->mnt_data = mntdata;
792 mount_unlock(mp);
801 vfs_devblocksize(mount_t mp) {
803 return(mp->mnt_devblocksize);
811 vfs_ioattr(mount_t mp, struct vfsioattr *ioattrp)
813 if (mp == NULL) {
823 ioattrp->io_maxreadcnt = mp->mnt_maxreadcnt;
824 ioattrp->io_maxwritecnt = mp->mnt_maxwritecnt;
825 ioattrp->io_segreadcnt = mp->mnt_segreadcnt;
826 ioattrp->io_segwritecnt = mp->mnt_segwritecnt;
827 ioattrp->io_maxsegreadsize = mp->mnt_maxsegreadsize;
828 ioattrp->io_maxsegwritesize = mp->mnt_maxsegwritesize;
829 ioattrp->io_devblocksize = mp->mnt_devblocksize;
830 ioattrp->io_flags = mp->mnt_ioflags;
841 vfs_setioattr(mount_t mp, struct vfsioattr * ioattrp)
843 if (mp == NULL)
845 mp->mnt_maxreadcnt = ioattrp->io_maxreadcnt;
846 mp->mnt_maxwritecnt = ioattrp->io_maxwritecnt;
847 mp->mnt_segreadcnt = ioattrp->io_segreadcnt;
848 mp->mnt_segwritecnt = ioattrp->io_segwritecnt;
849 mp->mnt_maxsegreadsize = ioattrp->io_maxsegreadsize;
850 mp->mnt_maxsegwritesize = ioattrp->io_maxsegwritesize;
851 mp->mnt_devblocksize = ioattrp->io_devblocksize;
852 mp->mnt_ioflags = ioattrp->io_flags;
1070 vfs_mountref(__unused mount_t mp ) /* gives a reference */
1077 vfs_mountrele(__unused mount_t mp ) /* drops reference */
1423 mount_t mp;
1425 if ((vp->v_type == VDIR) && ((mp = vp->v_mountedhere) != NULL) &&
1426 (mp->mnt_vnodecovered == vp))
1427 return (mp);