summaryrefslogtreecommitdiffstats
path: root/fs/cachefiles
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2021-10-22 09:17:58 +0100
committerDavid Howells <dhowells@redhat.com>2022-01-07 13:43:18 +0000
commit9f08ebc3438baaaefcc79654b330209b83397f17 (patch)
treec4a34bbcb7eb56afd6f23ba9c2b356e412178430 /fs/cachefiles
parent3929eca769b5a231010b4978acc61c0735da198f (diff)
downloadlinux-9f08ebc3438baaaefcc79654b330209b83397f17.tar.bz2
fscache, cachefiles: Display stat of culling events
Add a stat counter of culling events whereby the cache backend culls a file to make space (when asked by cachefilesd in this case) and display in /proc/fs/fscache/stats. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/163819654165.215744.3797804661644212436.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/163906961387.143852.9291157239960289090.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/163967168266.1823006.14436200166581605746.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/164021567619.640689.4339228906248763197.stgit@warthog.procyon.org.uk/ # v4
Diffstat (limited to 'fs/cachefiles')
-rw-r--r--fs/cachefiles/namei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
index ab3ca598acac..9bd692870617 100644
--- a/fs/cachefiles/namei.c
+++ b/fs/cachefiles/namei.c
@@ -805,6 +805,7 @@ int cachefiles_cull(struct cachefiles_cache *cache, struct dentry *dir,
if (ret < 0)
goto error;
+ fscache_count_culled();
dput(victim);
_leave(" = 0");
return 0;