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 <[email protected]> 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

