Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/msdosfs/msdosfs_vfsops.c
Show First 20 Lines • Show All 427 Lines • ▼ Show 20 Lines | mountmsdosfs(struct vnode *devvp, struct mount *mp) | ||||
error = g_vfs_open(devvp, &cp, "msdosfs", ronly ? 0 : 1); | error = g_vfs_open(devvp, &cp, "msdosfs", ronly ? 0 : 1); | ||||
g_topology_unlock(); | g_topology_unlock(); | ||||
if (error != 0) { | if (error != 0) { | ||||
atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); | atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); | ||||
VOP_UNLOCK(devvp); | VOP_UNLOCK(devvp); | ||||
return (error); | return (error); | ||||
} | } | ||||
dev_ref(dev); | dev_ref(dev); | ||||
bo = &devvp->v_bufobj; | bo = vp2bo(devvp); | ||||
VOP_UNLOCK(devvp); | VOP_UNLOCK(devvp); | ||||
if (dev->si_iosize_max != 0) | if (dev->si_iosize_max != 0) | ||||
mp->mnt_iosize_max = dev->si_iosize_max; | mp->mnt_iosize_max = dev->si_iosize_max; | ||||
if (mp->mnt_iosize_max > maxphys) | if (mp->mnt_iosize_max > maxphys) | ||||
mp->mnt_iosize_max = maxphys; | mp->mnt_iosize_max = maxphys; | ||||
/* | /* | ||||
* Read the boot sector of the filesystem, and then check the | * Read the boot sector of the filesystem, and then check the | ||||
▲ Show 20 Lines • Show All 487 Lines • ▼ Show 20 Lines | loop: | ||||
MNT_VNODE_FOREACH_ALL(vp, mp, nvp) { | MNT_VNODE_FOREACH_ALL(vp, mp, nvp) { | ||||
if (vp->v_type == VNON) { | if (vp->v_type == VNON) { | ||||
VI_UNLOCK(vp); | VI_UNLOCK(vp); | ||||
continue; | continue; | ||||
} | } | ||||
dep = VTODE(vp); | dep = VTODE(vp); | ||||
if ((dep->de_flag & | if ((dep->de_flag & | ||||
(DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && | (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && | ||||
(vp->v_bufobj.bo_dirty.bv_cnt == 0 || | (vp2bo(vp)->bo_dirty.bv_cnt == 0 || | ||||
waitfor == MNT_LAZY)) { | waitfor == MNT_LAZY)) { | ||||
VI_UNLOCK(vp); | VI_UNLOCK(vp); | ||||
continue; | continue; | ||||
} | } | ||||
error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK); | error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK); | ||||
if (error) { | if (error) { | ||||
if (error == ENOENT) { | if (error == ENOENT) { | ||||
MNT_VNODE_FOREACH_ALL_ABORT(mp, nvp); | MNT_VNODE_FOREACH_ALL_ABORT(mp, nvp); | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |