Lines Matching refs:vswp

596 	struct vfssw *vswp;  in vfs_sync()  local
598 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_sync()
599 if (ALLOCATED_VFSSW(vswp) && VFS_INSTALLED(vswp)) { in vfs_sync()
600 vfs_refvfssw(vswp); in vfs_sync()
602 (void) (*vswp->vsw_vfsops.vfs_sync)(NULL, flag, in vfs_sync()
604 vfs_unrefvfssw(vswp); in vfs_sync()
864 struct vfssw *vswp; in vfs_mountroot() local
942 if ((vswp = vfs_getvfsswbyvfsops(vfs_getops(rootvfs))) != NULL) { in vfs_mountroot()
944 if (vswp->vsw_flag & VSW_STATS) { in vfs_mountroot()
948 get_fstype_vopstats(rootvfs, vswp); in vfs_mountroot()
951 vfs_unrefvfssw(vswp); in vfs_mountroot()
1166 struct vfssw *vswp; in domount() local
1226 if ((vswp = vfs_getvfssw(fsname)) == NULL) { in domount()
1244 if ((vswp = vfs_getvfssw(fsname)) == NULL) in domount()
1262 if ((vswp = vfs_getvfssw(fsname)) == NULL) in domount()
1266 if ((vswp = vfs_getvfsswbyvfsops(vfs_getops(rootvfs))) == NULL) in domount()
1268 fsname = vswp->vsw_name; in domount()
1270 if (!VFS_INSTALLED(vswp)) in domount()
1274 vfs_unrefvfssw(vswp); in domount()
1278 vfsops = &vswp->vsw_vfsops; in domount()
1280 vfs_copyopttbl(&vswp->vsw_optproto, &mnt_mntopts); in domount()
1321 if (!(vswp->vsw_flag & VSW_CANREMOUNT)) { in domount()
1499 (vswp->vsw_flag & VSW_CANRWRO) == 0) { in domount()
1552 "mount type %s couldn't get vfs_reflock", vswp->vsw_name); in domount()
1640 if (!(vswp->vsw_flag & VSW_HASPROTO)) { in domount()
1822 if (!remount && (vswp->vsw_flag & VSW_STATS) && splice) { in domount()
1831 vfsp->vfs_fstypevsp = get_fstype_vopstats(vfsp, vswp); in domount()
1834 if (vswp->vsw_flag & VSW_XID) in domount()
1879 ASSERT(vswp != NULL); in domount()
1880 vfs_unrefvfssw(vswp); in domount()
3973 struct vfssw *vswp; in allocate_vfssw() local
3986 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) in allocate_vfssw()
3987 if (!ALLOCATED_VFSSW(vswp)) { in allocate_vfssw()
3988 vswp->vsw_name = kmem_alloc(strlen(type) + 1, KM_SLEEP); in allocate_vfssw()
3989 (void) strcpy(vswp->vsw_name, type); in allocate_vfssw()
3990 ASSERT(vswp->vsw_count == 0); in allocate_vfssw()
3991 vswp->vsw_count = 1; in allocate_vfssw()
3992 mutex_init(&vswp->vsw_lock, NULL, MUTEX_DEFAULT, NULL); in allocate_vfssw()
3993 return (vswp); in allocate_vfssw()
4024 struct vfssw *vswp; in vfs_getvfssw() local
4028 vswp = vfs_getvfsswbyname(type); in vfs_getvfssw()
4037 if (vswp == NULL) { in vfs_getvfssw()
4040 if ((vswp = vfs_getvfsswbyname(type)) == NULL) { in vfs_getvfssw()
4041 if ((vswp = allocate_vfssw(type)) == NULL) { in vfs_getvfssw()
4049 if (!VFS_INSTALLED(vswp)) { in vfs_getvfssw()
4054 return (vswp); in vfs_getvfssw()
4066 while (vswp == NULL || !VFS_INSTALLED(vswp)) { in vfs_getvfssw()
4071 if (vswp == NULL) in vfs_getvfssw()
4072 if ((vswp = vfs_getvfsswbyname(type)) == NULL) in vfs_getvfssw()
4077 return (vswp); in vfs_getvfssw()
4086 struct vfssw *vswp; in vfs_getvfsswbyname() local
4092 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_getvfsswbyname()
4093 if (strcmp(type, vswp->vsw_name) == 0) { in vfs_getvfsswbyname()
4094 vfs_refvfssw(vswp); in vfs_getvfsswbyname()
4095 return (vswp); in vfs_getvfsswbyname()
4108 struct vfssw *vswp; in vfs_getvfsswbyvfsops() local
4111 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfs_getvfsswbyvfsops()
4112 if (ALLOCATED_VFSSW(vswp) && &vswp->vsw_vfsops == vfsops) { in vfs_getvfsswbyvfsops()
4113 vfs_refvfssw(vswp); in vfs_getvfsswbyvfsops()
4115 return (vswp); in vfs_getvfsswbyvfsops()
4127 vfs_refvfssw(struct vfssw *vswp) in vfs_refvfssw() argument
4130 mutex_enter(&vswp->vsw_lock); in vfs_refvfssw()
4131 vswp->vsw_count++; in vfs_refvfssw()
4132 mutex_exit(&vswp->vsw_lock); in vfs_refvfssw()
4139 vfs_unrefvfssw(struct vfssw *vswp) in vfs_unrefvfssw() argument
4142 mutex_enter(&vswp->vsw_lock); in vfs_unrefvfssw()
4143 vswp->vsw_count--; in vfs_unrefvfssw()
4144 mutex_exit(&vswp->vsw_lock); in vfs_unrefvfssw()
4324 struct vfssw *vswp; in vfsinit() local
4389 for (vswp = &vfssw[1]; vswp < &vfssw[nfstype]; vswp++) { in vfsinit()
4391 if (vswp->vsw_init != NULL) in vfsinit()
4392 (*vswp->vsw_init)(vswp - vfssw, vswp->vsw_name); in vfsinit()