diff options
author | David Howells <dhowells@redhat.com> | 2021-10-21 21:58:29 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2022-01-07 13:43:13 +0000 |
commit | 3929eca769b5a231010b4978acc61c0735da198f (patch) | |
tree | 9f3c81aa6f3e67ad688587db70b17a1e3e4a215b /include | |
parent | ecd1a5f62eed35d812de8fe20703e21b551c6560 (diff) | |
download | linux-stable-3929eca769b5a231010b4978acc61c0735da198f.tar.gz linux-stable-3929eca769b5a231010b4978acc61c0735da198f.tar.bz2 linux-stable-3929eca769b5a231010b4978acc61c0735da198f.zip |
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 'include')
-rw-r--r-- | include/linux/fscache-cache.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 3fa4902dc87c..007e47f38610 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h @@ -186,11 +186,17 @@ static inline void fscache_wait_for_objects(struct fscache_cache *cache) #ifdef CONFIG_FSCACHE_STATS extern atomic_t fscache_n_read; extern atomic_t fscache_n_write; +extern atomic_t fscache_n_no_write_space; +extern atomic_t fscache_n_no_create_space; #define fscache_count_read() atomic_inc(&fscache_n_read) #define fscache_count_write() atomic_inc(&fscache_n_write) +#define fscache_count_no_write_space() atomic_inc(&fscache_n_no_write_space) +#define fscache_count_no_create_space() atomic_inc(&fscache_n_no_create_space) #else #define fscache_count_read() do {} while(0) #define fscache_count_write() do {} while(0) +#define fscache_count_no_write_space() do {} while(0) +#define fscache_count_no_create_space() do {} while(0) #endif #endif /* _LINUX_FSCACHE_CACHE_H */ |