Lines Matching +full:11 +full:mp

1 /*	$NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $	*/
115 static int update_mp(struct mount *mp, struct thread *td);
116 static int mountmsdosfs(struct vnode *devvp, struct mount *mp);
129 update_mp(struct mount *mp, struct thread *td) in update_mp() argument
131 struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); in update_mp()
135 if (!vfs_getopt(mp->mnt_optnew, "kiconv", NULL, NULL)) { in update_mp()
137 error = vfs_getopt(mp->mnt_optnew, in update_mp()
140 error = vfs_getopt(mp->mnt_optnew, in update_mp()
143 error = vfs_getopt(mp->mnt_optnew, in update_mp()
161 if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1) in update_mp()
163 if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1) in update_mp()
165 if (vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v) == 1) in update_mp()
167 if (vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v) == 1) in update_mp()
169 vfs_flagopt(mp->mnt_optnew, "shortname", in update_mp()
171 vfs_flagopt(mp->mnt_optnew, "shortnames", in update_mp()
173 vfs_flagopt(mp->mnt_optnew, "longname", in update_mp()
175 vfs_flagopt(mp->mnt_optnew, "longnames", in update_mp()
177 vfs_flagopt(mp->mnt_optnew, "kiconv", in update_mp()
180 if (vfs_getopt(mp->mnt_optnew, "nowin95", NULL, NULL) == 0) in update_mp()
226 * mp - path - addr in user space of mount point (ie /usr or whatever)
231 msdosfs_mount(struct mount *mp) in msdosfs_mount() argument
243 if (vfs_filteropt(mp->mnt_optnew, msdosfs_opts)) in msdosfs_mount()
250 if (mp->mnt_flag & MNT_UPDATE) { in msdosfs_mount()
251 pmp = VFSTOMSDOSFS(mp); in msdosfs_mount()
253 vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { in msdosfs_mount()
254 if ((error = vn_start_write(NULL, &mp, V_WAIT)) != 0) in msdosfs_mount()
256 error = vfs_write_suspend_umnt(mp); in msdosfs_mount()
261 if (mp->mnt_flag & MNT_FORCE) in msdosfs_mount()
263 error = vflush(mp, 0, flags, td); in msdosfs_mount()
265 vfs_write_resume(mp, 0); in msdosfs_mount()
275 vfs_write_resume(mp, 0); in msdosfs_mount()
285 vfs_write_resume(mp, 0); in msdosfs_mount()
296 MNT_ILOCK(mp); in msdosfs_mount()
297 mp->mnt_flag |= MNT_RDONLY; in msdosfs_mount()
298 MNT_IUNLOCK(mp); in msdosfs_mount()
299 vfs_write_resume(mp, 0); in msdosfs_mount()
301 !vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { in msdosfs_mount()
339 MNT_ILOCK(mp); in msdosfs_mount()
340 mp->mnt_flag &= ~MNT_RDONLY; in msdosfs_mount()
341 MNT_IUNLOCK(mp); in msdosfs_mount()
355 if (vfs_getopt(mp->mnt_optnew, "from", (void **)&from, NULL)) in msdosfs_mount()
373 if ((mp->mnt_flag & MNT_RDONLY) == 0) in msdosfs_mount()
382 if ((mp->mnt_flag & MNT_UPDATE) == 0) { in msdosfs_mount()
383 error = mountmsdosfs(devvp, mp); in msdosfs_mount()
385 pmp = VFSTOMSDOSFS(mp); in msdosfs_mount()
397 error = update_mp(mp, td); in msdosfs_mount()
399 if ((mp->mnt_flag & MNT_UPDATE) == 0) in msdosfs_mount()
400 msdosfs_unmount(mp, MNT_FORCE); in msdosfs_mount()
404 vfs_mountedfrom(mp, from); in msdosfs_mount()
406 printf("msdosfs_mount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); in msdosfs_mount()
503 mountmsdosfs(struct vnode *odevvp, struct mount *mp) in mountmsdosfs() argument
521 ronly = (mp->mnt_flag & MNT_RDONLY) != 0; in mountmsdosfs()
523 devvp = mntfs_allocvp(mp, odevvp); in mountmsdosfs()
526 (uintptr_t)mp) == 0) { in mountmsdosfs()
545 mp->mnt_iosize_max = dev->si_iosize_max; in mountmsdosfs()
546 if (mp->mnt_iosize_max > maxphys) in mountmsdosfs()
547 mp->mnt_iosize_max = maxphys; in mountmsdosfs()
573 pmp->pm_mountp = mp; in mountmsdosfs()
832 if (mp->mnt_flag & MNT_SYNCHRONOUS) in mountmsdosfs()
854 mp->mnt_data = pmp; in mountmsdosfs()
855 mp->mnt_stat.f_fsid.val[0] = dev2udev(dev); in mountmsdosfs()
856 mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; in mountmsdosfs()
857 MNT_ILOCK(mp); in mountmsdosfs()
858 mp->mnt_flag |= MNT_LOCAL; in mountmsdosfs()
859 mp->mnt_kern_flag |= MNTK_USES_BCACHE | MNTK_NO_IOPF; in mountmsdosfs()
860 MNT_IUNLOCK(mp); in mountmsdosfs()
877 mp->mnt_data = NULL; in mountmsdosfs()
890 * Unmount the filesystem described by mp.
893 msdosfs_unmount(struct mount *mp, int mntflags) in msdosfs_unmount() argument
900 pmp = VFSTOMSDOSFS(mp); in msdosfs_unmount()
904 error = vfs_write_suspend_umnt(mp); in msdosfs_unmount()
911 error = vflush(mp, 0, flags, curthread); in msdosfs_unmount()
914 vfs_write_resume(mp, VR_START_WRITE); in msdosfs_unmount()
921 vfs_write_resume(mp, VR_START_WRITE); in msdosfs_unmount()
959 vfs_write_resume(mp, VR_START_WRITE); in msdosfs_unmount()
976 mp->mnt_data = NULL; in msdosfs_unmount()
1037 msdosfs_root(struct mount *mp, int flags, struct vnode **vpp) in msdosfs_root() argument
1039 struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); in msdosfs_root()
1044 printf("msdosfs_root(); mp %p, pmp %p\n", mp, pmp); in msdosfs_root()
1054 msdosfs_statfs(struct mount *mp, struct statfs *sbp) in msdosfs_statfs() argument
1058 pmp = VFSTOMSDOSFS(mp); in msdosfs_statfs()
1104 msdosfs_sync(struct mount *mp, int waitfor) in msdosfs_sync() argument
1109 struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); in msdosfs_sync()
1129 MNT_VNODE_FOREACH_ALL(vp, mp, nvp) { in msdosfs_sync()
1145 MNT_VNODE_FOREACH_ALL_ABORT(mp, nvp); in msdosfs_sync()
1172 MNT_ILOCK(mp); in msdosfs_sync()
1173 mp->mnt_kern_flag |= MNTK_SUSPEND2 | MNTK_SUSPENDED; in msdosfs_sync()
1174 MNT_IUNLOCK(mp); in msdosfs_sync()
1180 msdosfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) in msdosfs_fhtovp() argument
1182 struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); in msdosfs_fhtovp()