svn commit: r300601 - stable/10/sys/ufs/ffs
Konstantin Belousov
kib at FreeBSD.org
Tue May 24 10:46:25 UTC 2016
Author: kib
Date: Tue May 24 10:46:23 2016
New Revision: 300601
URL: https://svnweb.freebsd.org/changeset/base/300601
Log:
MFC r300084:
Do enable io accounting for read-only mounts and mounts which are
remounted to writeable after initial read-only. Assign to
dev->si_mountpt earlier to account the accesses done at the mount
time.
Modified:
stable/10/sys/ufs/ffs/ffs_vfsops.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- stable/10/sys/ufs/ffs/ffs_vfsops.c Tue May 24 10:41:34 2016 (r300600)
+++ stable/10/sys/ufs/ffs/ffs_vfsops.c Tue May 24 10:46:23 2016 (r300601)
@@ -780,6 +780,8 @@ ffs_mountfs(devvp, mp, td)
mp->mnt_iosize_max = MAXPHYS;
devvp->v_bufobj.bo_ops = &ffs_ops;
+ if (devvp->v_type == VCHR)
+ devvp->v_rdev->si_mountpt = mp;
fs = NULL;
sblockloc = 0;
@@ -1049,8 +1051,6 @@ ffs_mountfs(devvp, mp, td)
ffs_flushfiles(mp, FORCECLOSE, td);
goto out;
}
- if (devvp->v_type == VCHR && devvp->v_rdev != NULL)
- devvp->v_rdev->si_mountpt = mp;
if (fs->fs_snapinum[0] != 0)
ffs_snapshot_mount(mp);
fs->fs_fmod = 1;
@@ -1083,6 +1083,8 @@ ffs_mountfs(devvp, mp, td)
out:
if (bp)
brelse(bp);
+ if (devvp->v_type == VCHR && devvp->v_rdev != NULL)
+ devvp->v_rdev->si_mountpt = NULL;
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
More information about the svn-src-stable
mailing list