summaryrefslogtreecommitdiff
path: root/fs/cachefiles/namei.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2021-10-21 23:58:29 +0300
committerDavid Howells <dhowells@redhat.com>2022-01-07 16:43:13 +0300
commit3929eca769b5a231010b4978acc61c0735da198f (patch)
tree9f3c81aa6f3e67ad688587db70b17a1e3e4a215b /fs/cachefiles/namei.c
parentecd1a5f62eed35d812de8fe20703e21b551c6560 (diff)
downloadlinux-3929eca769b5a231010b4978acc61c0735da198f.tar.xz
fscache, cachefiles: Display stats of no-space events
Add stat counters of no-space events that caused caching not to happen 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/163819653216.215744.17210522251617386509.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/163906958369.143852.7257100711818401748.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/163967166917.1823006.14842444049198947892.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/164021566184.640689.4417328329632709265.stgit@warthog.procyon.org.uk/ # v4
Diffstat (limited to 'fs/cachefiles/namei.c')
-rw-r--r--fs/cachefiles/namei.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
index b549e9f79c01..ab3ca598acac 100644
--- a/fs/cachefiles/namei.c
+++ b/fs/cachefiles/namei.c
@@ -115,7 +115,8 @@ retry:
/* we need to create the subdir if it doesn't exist yet */
if (d_is_negative(subdir)) {
- ret = cachefiles_has_space(cache, 1, 0);
+ ret = cachefiles_has_space(cache, 1, 0,
+ cachefiles_has_space_for_create);
if (ret < 0)
goto mkdir_error;
@@ -513,7 +514,8 @@ static bool cachefiles_create_file(struct cachefiles_object *object)
struct file *file;
int ret;
- ret = cachefiles_has_space(object->volume->cache, 1, 0);
+ ret = cachefiles_has_space(object->volume->cache, 1, 0,
+ cachefiles_has_space_for_create);
if (ret < 0)
return false;