diff options
author | kib <kib@FreeBSD.org> | 2016-05-24 10:46:23 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-05-24 10:46:23 +0000 |
commit | 052b0aa91c8b5609f559e93d76f17529dd941846 (patch) | |
tree | c6e43964e9182e1cf62151ce3ccf1c348fa31ce2 | |
parent | 9b3635bacc50b3811d2d236b6fa3046a7a5bf228 (diff) | |
download | FreeBSD-src-052b0aa91c8b5609f559e93d76f17529dd941846.zip FreeBSD-src-052b0aa91c8b5609f559e93d76f17529dd941846.tar.gz |
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.
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 2523159..97c3d54 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -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(); |