diff options
author | drowfx <[email protected]> | 2022-02-09 23:41:42 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-02-09 14:41:42 -0800 |
commit | 3819aaaff921733a58e091b37b5e87b740356542 (patch) | |
tree | d754894b570c15d9618b5976856298dc4004ba6a /module/os/linux/zfs/zfs_vnops_os.c | |
parent | 68ddc06b611854560fefa377437eb3c9480e084b (diff) |
Add dataset_kstats_update.. to mmap read/write paths
This allows reads/writes caused by accesses to mmap files to be
accounted correctly in the per-dataset kstats for both Linux and
FreeBSD.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Matthias Blankertz <[email protected]>
Closes #12994
Closes #13044
Diffstat (limited to 'module/os/linux/zfs/zfs_vnops_os.c')
-rw-r--r-- | module/os/linux/zfs/zfs_vnops_os.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zfs_vnops_os.c b/module/os/linux/zfs/zfs_vnops_os.c index c6115b530..3cc0e69cc 100644 --- a/module/os/linux/zfs/zfs_vnops_os.c +++ b/module/os/linux/zfs/zfs_vnops_os.c @@ -3610,6 +3610,8 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc) zil_commit(zfsvfs->z_log, zp->z_id); } + dataset_kstats_update_write_kstats(&zfsvfs->z_kstat, pglen); + ZFS_EXIT(zfsvfs); return (err); } @@ -3805,6 +3807,8 @@ zfs_getpage(struct inode *ip, struct page *pl[], int nr_pages) err = zfs_fillpage(ip, pl, nr_pages); + dataset_kstats_update_read_kstats(&zfsvfs->z_kstat, nr_pages*PAGESIZE); + ZFS_EXIT(zfsvfs); return (err); } |