Lines Matching refs:vswp

618 	struct vfssw *vswp;  in vfs_sync()  local
620 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_sync()
621 if (ALLOCATED_VFSSW(vswp) && VFS_INSTALLED(vswp)) { in vfs_sync()
622 vfs_refvfssw(vswp); in vfs_sync()
624 (void) (*vswp->vsw_vfsops.vfs_sync)(NULL, flag, in vfs_sync()
626 vfs_unrefvfssw(vswp); in vfs_sync()
844 struct vfssw *vswp; in vfs_mountroot() local
914 if ((vswp = vfs_getvfsswbyvfsops(vfs_getops(rootvfs))) != NULL) { in vfs_mountroot()
916 if (vswp->vsw_flag & VSW_STATS) { in vfs_mountroot()
920 get_fstype_vopstats(rootvfs, vswp); in vfs_mountroot()
923 vfs_unrefvfssw(vswp); in vfs_mountroot()
1112 struct vfssw *vswp; in domount() local
1172 if ((vswp = vfs_getvfssw(fsname)) == NULL) { in domount()
1190 if ((vswp = vfs_getvfssw(fsname)) == NULL) in domount()
1208 if ((vswp = vfs_getvfssw(fsname)) == NULL) in domount()
1212 if ((vswp = vfs_getvfsswbyvfsops(vfs_getops(rootvfs))) == NULL) in domount()
1214 fsname = vswp->vsw_name; in domount()
1216 if (!VFS_INSTALLED(vswp)) in domount()
1220 vfs_unrefvfssw(vswp); in domount()
1224 vfsops = &vswp->vsw_vfsops; in domount()
1226 vfs_copyopttbl(&vswp->vsw_optproto, &mnt_mntopts); in domount()
1267 if (!(vswp->vsw_flag & VSW_CANREMOUNT)) { in domount()
1314 if ((vswp->vsw_flag & VSW_MOUNTDEV) && in domount()
1446 (vswp->vsw_flag & VSW_CANRWRO) == 0) { in domount()
1499 "mount type %s couldn't get vfs_reflock", vswp->vsw_name); in domount()
1529 if ((vswp->vsw_flag & VSW_MOUNTDEV) && in domount()
1586 if (!(vswp->vsw_flag & VSW_HASPROTO)) { in domount()
1768 if (!remount && (vswp->vsw_flag & VSW_STATS) && splice) { in domount()
1777 vfsp->vfs_fstypevsp = get_fstype_vopstats(vfsp, vswp); in domount()
1780 if (vswp->vsw_flag & VSW_XID) in domount()
1825 ASSERT(vswp != NULL); in domount()
1826 vfs_unrefvfssw(vswp); in domount()
3868 struct vfssw *vswp; in allocate_vfssw() local
3881 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) in allocate_vfssw()
3882 if (!ALLOCATED_VFSSW(vswp)) { in allocate_vfssw()
3883 vswp->vsw_name = kmem_alloc(strlen(type) + 1, KM_SLEEP); in allocate_vfssw()
3884 (void) strcpy(vswp->vsw_name, type); in allocate_vfssw()
3885 ASSERT(vswp->vsw_count == 0); in allocate_vfssw()
3886 vswp->vsw_count = 1; in allocate_vfssw()
3887 mutex_init(&vswp->vsw_lock, NULL, MUTEX_DEFAULT, NULL); in allocate_vfssw()
3888 return (vswp); in allocate_vfssw()
3919 struct vfssw *vswp; in vfs_getvfssw() local
3923 vswp = vfs_getvfsswbyname(type); in vfs_getvfssw()
3932 if (vswp == NULL) { in vfs_getvfssw()
3935 if ((vswp = vfs_getvfsswbyname(type)) == NULL) { in vfs_getvfssw()
3936 if ((vswp = allocate_vfssw(type)) == NULL) { in vfs_getvfssw()
3944 if (!VFS_INSTALLED(vswp)) { in vfs_getvfssw()
3949 return (vswp); in vfs_getvfssw()
3961 while (vswp == NULL || !VFS_INSTALLED(vswp)) { in vfs_getvfssw()
3966 if (vswp == NULL) in vfs_getvfssw()
3967 if ((vswp = vfs_getvfsswbyname(type)) == NULL) in vfs_getvfssw()
3972 return (vswp); in vfs_getvfssw()
3981 struct vfssw *vswp; in vfs_getvfsswbyname() local
3987 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_getvfsswbyname()
3988 if (strcmp(type, vswp->vsw_name) == 0) { in vfs_getvfsswbyname()
3989 vfs_refvfssw(vswp); in vfs_getvfsswbyname()
3990 return (vswp); in vfs_getvfsswbyname()
4003 struct vfssw *vswp; in vfs_getvfsswbyvfsops() local
4006 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_getvfsswbyvfsops()
4007 if (ALLOCATED_VFSSW(vswp) && &vswp->vsw_vfsops == vfsops) { in vfs_getvfsswbyvfsops()
4008 vfs_refvfssw(vswp); in vfs_getvfsswbyvfsops()
4010 return (vswp); in vfs_getvfsswbyvfsops()
4022 vfs_refvfssw(struct vfssw *vswp) in vfs_refvfssw() argument
4025 mutex_enter(&vswp->vsw_lock); in vfs_refvfssw()
4026 vswp->vsw_count++; in vfs_refvfssw()
4027 mutex_exit(&vswp->vsw_lock); in vfs_refvfssw()
4034 vfs_unrefvfssw(struct vfssw *vswp) in vfs_unrefvfssw() argument
4037 mutex_enter(&vswp->vsw_lock); in vfs_unrefvfssw()
4038 vswp->vsw_count--; in vfs_unrefvfssw()
4039 mutex_exit(&vswp->vsw_lock); in vfs_unrefvfssw()
4185 struct vfssw *vswp; in vfsinit() local
4252 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfsinit()
4254 if (vswp->vsw_init != NULL) in vfsinit()
4255 (void) (*vswp->vsw_init)(vswp - vfssw, vswp->vsw_name); in vfsinit()