[PATCH 0/3] ovl: make cachestat() work
From: Pavel Tikhomirov
Date: Tue Jun 23 2026 - 07:15:52 EST
We were using cachestat() for our internal Virtuozzo cache related tests
and I saw that test behaves wrong on overlayfs, syscall returns all
zeroes instead of any meaningful cache statistics there. Let's fix it
similar to what was done for fadvise().
Signed-off-by: Pavel Tikhomirov <ptikhomirov@xxxxxxxxxxxxx>
Pavel Tikhomirov (3):
fs, mm: add ->cachestat() file operation
ovl: support cachestat() syscall on overlayfs files
selftests/cachestat: add an overlayfs test case
fs/overlayfs/file.c | 18 +++++
include/linux/fs.h | 10 +++
mm/filemap.c | 43 +++++++++--
.../selftests/cachestat/test_cachestat.c | 75 ++++++++++++++++++-
4 files changed, 137 insertions(+), 9 deletions(-)
--
2.54.0