linux/fs/cachefiles
David Howells 80f94f29f6 cachefiles: Provide a function to check how much space there is
Provide a function to check how much space there is.  This also flips the
state on the cache and will signal the daemon to inform it of the change
and to ask it to do some culling if necessary.

We will also need to subtract the amount of data currently being written to
the cache (cache->b_writing) from the amount of available space to avoid
hitting ENOSPC accidentally.

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/163819629322.215744.13457425294680841213.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/163906930100.143852.1681026700865762069.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163967140058.1823006.7781243664702837128.stgit@warthog.procyon.org.uk/ # v3
Link: https://lore.kernel.org/r/164021539957.640689.12477177372616805706.stgit@warthog.procyon.org.uk/ # v4
2022-01-07 13:41:26 +00:00
..
cache.c cachefiles: Provide a function to check how much space there is 2022-01-07 13:41:26 +00:00
daemon.c cachefiles: Provide a function to check how much space there is 2022-01-07 13:41:26 +00:00
error_inject.c cachefiles: Add some error injection support 2022-01-07 13:40:56 +00:00
internal.h cachefiles: Provide a function to check how much space there is 2022-01-07 13:41:26 +00:00
Kconfig cachefiles: Add some error injection support 2022-01-07 13:40:56 +00:00
main.c cachefiles: Register a miscdev and parse commands over it 2022-01-07 13:41:20 +00:00
Makefile cachefiles: Provide a function to check how much space there is 2022-01-07 13:41:26 +00:00
security.c cachefiles: Add security derivation 2022-01-07 13:41:14 +00:00