summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2012-03-28 20:49:11 +0000
committermckusick <mckusick@FreeBSD.org>2012-03-28 20:49:11 +0000
commit9a7982e5a0267c0421856f3a43a1ae75880058f3 (patch)
treee4296e1e7484307c80036dcfa1043b1869febf17 /sys/ufs
parent4d38be64d75540ce84d18b307ffc130ac5d5f2f9 (diff)
downloadFreeBSD-src-9a7982e5a0267c0421856f3a43a1ae75880058f3.zip
FreeBSD-src-9a7982e5a0267c0421856f3a43a1ae75880058f3.tar.gz
Keep track of the mount point associated with a special device
to enable the collection of counts of synchronous and asynchronous reads and writes for its associated filesystem. The counts are displayed using `mount -v'. Ensure that buffers used for paging indicate the vnode from which they are operating so that counts of paging I/O operations from the filesystem are collected. This checkin only adds the setting of the mount point for the UFS/FFS filesystem, but it would be trivial to add the setting and clearing of the mount point at filesystem mount/unmount time for other filesystems too. Reviewed by: kib
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 8871cdf..f38fbcb 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -407,6 +407,8 @@ ffs_mount(struct mount *mp)
vn_finished_write(mp);
return (error);
}
+ 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);
vn_finished_write(mp);
@@ -1050,6 +1052,8 @@ 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;
@@ -1295,6 +1299,8 @@ ffs_unmount(mp, mntflags)
g_vfs_close(ump->um_cp);
g_topology_unlock();
PICKUP_GIANT();
+ if (ump->um_devvp->v_type == VCHR && ump->um_devvp->v_rdev != NULL)
+ ump->um_devvp->v_rdev->si_mountpt = NULL;
vrele(ump->um_devvp);
dev_rel(ump->um_dev);
mtx_destroy(UFS_MTX(ump));
OpenPOWER on IntegriCloud