]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_io: Add cachestat syscall support
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Sun, 16 Mar 2025 18:45:29 +0000 (00:15 +0530)
committerAndrey Albershteyn <aalbersh@kernel.org>
Mon, 31 Mar 2025 09:45:04 +0000 (11:45 +0200)
commit2d5aa51bee121208da9c11be6d14c463c5661d26
tree1a133ec5aa4ca9f99cc956627b848bdb2ff0a804
parent840b472675eddf12e405d8821185439a4cf5fa6c
xfs_io: Add cachestat syscall support

This adds -c "cachestat off len" command which uses cachestat() syscall
[1]. This can provide following pagecache detail for a file.

- no. of cached pages,
- no. of dirty pages,
- no. of pages marked for writeback,
- no. of evicted pages,
- no. of recently evicted pages

[1]: https://lore.kernel.org/all/20230503013608.2431726-3-nphamcs@gmail.com/T/#u

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
[aalbersh remove [] from command arguments help]
configure.ac
include/builddefs.in
io/Makefile
io/cachestat.c [new file with mode: 0644]
io/init.c
io/io.h
m4/package_libcdev.m4