mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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 <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org> Signed-off-by: Matthias Blankertz <matthias@blankertz.org> Closes #12994 Closes #13044
This commit is contained in:
@@ -3635,6 +3635,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);
|
||||
}
|
||||
@@ -3830,6 +3832,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user