Lines Matching refs:vswp

604 	struct vfssw *vswp;  in vfs_sync()  local
606 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_sync()
607 if (ALLOCATED_VFSSW(vswp) && VFS_INSTALLED(vswp)) { in vfs_sync()
608 vfs_refvfssw(vswp); in vfs_sync()
610 (void) (*vswp->vsw_vfsops.vfs_sync)(NULL, flag, in vfs_sync()
612 vfs_unrefvfssw(vswp); in vfs_sync()
872 struct vfssw *vswp; in vfs_mountroot() local
950 if ((vswp = vfs_getvfsswbyvfsops(vfs_getops(rootvfs))) != NULL) { in vfs_mountroot()
952 if (vswp->vsw_flag & VSW_STATS) { in vfs_mountroot()
956 get_fstype_vopstats(rootvfs, vswp); in vfs_mountroot()
959 vfs_unrefvfssw(vswp); in vfs_mountroot()
1149 struct vfssw *vswp; in domount() local
1209 if ((vswp = vfs_getvfssw(fsname)) == NULL) { in domount()
1227 if ((vswp = vfs_getvfssw(fsname)) == NULL) in domount()
1245 if ((vswp = vfs_getvfssw(fsname)) == NULL) in domount()
1249 if ((vswp = vfs_getvfsswbyvfsops(vfs_getops(rootvfs))) == NULL) in domount()
1251 fsname = vswp->vsw_name; in domount()
1253 if (!VFS_INSTALLED(vswp)) in domount()
1257 vfs_unrefvfssw(vswp); in domount()
1261 vfsops = &vswp->vsw_vfsops; in domount()
1263 vfs_copyopttbl(&vswp->vsw_optproto, &mnt_mntopts); in domount()
1304 if (!(vswp->vsw_flag & VSW_CANREMOUNT)) { in domount()
1482 (vswp->vsw_flag & VSW_CANRWRO) == 0) { in domount()
1535 "mount type %s couldn't get vfs_reflock", vswp->vsw_name); in domount()
1623 if (!(vswp->vsw_flag & VSW_HASPROTO)) { in domount()
1810 if (!remount && (vswp->vsw_flag & VSW_STATS) && splice) { in domount()
1819 vfsp->vfs_fstypevsp = get_fstype_vopstats(vfsp, vswp); in domount()
1822 if (vswp->vsw_flag & VSW_XID) in domount()
1867 ASSERT(vswp != NULL); in domount()
1868 vfs_unrefvfssw(vswp); in domount()
3961 struct vfssw *vswp; in allocate_vfssw() local
3974 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) in allocate_vfssw()
3975 if (!ALLOCATED_VFSSW(vswp)) { in allocate_vfssw()
3976 vswp->vsw_name = kmem_alloc(strlen(type) + 1, KM_SLEEP); in allocate_vfssw()
3977 (void) strcpy(vswp->vsw_name, type); in allocate_vfssw()
3978 ASSERT(vswp->vsw_count == 0); in allocate_vfssw()
3979 vswp->vsw_count = 1; in allocate_vfssw()
3980 mutex_init(&vswp->vsw_lock, NULL, MUTEX_DEFAULT, NULL); in allocate_vfssw()
3981 return (vswp); in allocate_vfssw()
4012 struct vfssw *vswp; in vfs_getvfssw() local
4016 vswp = vfs_getvfsswbyname(type); in vfs_getvfssw()
4025 if (vswp == NULL) { in vfs_getvfssw()
4028 if ((vswp = vfs_getvfsswbyname(type)) == NULL) { in vfs_getvfssw()
4029 if ((vswp = allocate_vfssw(type)) == NULL) { in vfs_getvfssw()
4037 if (!VFS_INSTALLED(vswp)) { in vfs_getvfssw()
4042 return (vswp); in vfs_getvfssw()
4054 while (vswp == NULL || !VFS_INSTALLED(vswp)) { in vfs_getvfssw()
4059 if (vswp == NULL) in vfs_getvfssw()
4060 if ((vswp = vfs_getvfsswbyname(type)) == NULL) in vfs_getvfssw()
4065 return (vswp); in vfs_getvfssw()
4074 struct vfssw *vswp; in vfs_getvfsswbyname() local
4080 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_getvfsswbyname()
4081 if (strcmp(type, vswp->vsw_name) == 0) { in vfs_getvfsswbyname()
4082 vfs_refvfssw(vswp); in vfs_getvfsswbyname()
4083 return (vswp); in vfs_getvfsswbyname()
4096 struct vfssw *vswp; in vfs_getvfsswbyvfsops() local
4099 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_getvfsswbyvfsops()
4100 if (ALLOCATED_VFSSW(vswp) && &vswp->vsw_vfsops == vfsops) { in vfs_getvfsswbyvfsops()
4101 vfs_refvfssw(vswp); in vfs_getvfsswbyvfsops()
4103 return (vswp); in vfs_getvfsswbyvfsops()
4115 vfs_refvfssw(struct vfssw *vswp) in vfs_refvfssw() argument
4118 mutex_enter(&vswp->vsw_lock); in vfs_refvfssw()
4119 vswp->vsw_count++; in vfs_refvfssw()
4120 mutex_exit(&vswp->vsw_lock); in vfs_refvfssw()
4127 vfs_unrefvfssw(struct vfssw *vswp) in vfs_unrefvfssw() argument
4130 mutex_enter(&vswp->vsw_lock); in vfs_unrefvfssw()
4131 vswp->vsw_count--; in vfs_unrefvfssw()
4132 mutex_exit(&vswp->vsw_lock); in vfs_unrefvfssw()
4312 struct vfssw *vswp; in vfsinit() local
4377 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfsinit()
4379 if (vswp->vsw_init != NULL) in vfsinit()
4380 (*vswp->vsw_init)(vswp - vfssw, vswp->vsw_name); in vfsinit()