]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
cachefiles: Provide a function to check how much space there is
authorDavid Howells <dhowells@redhat.com>
Thu, 21 Oct 2021 07:59:46 +0000 (08:59 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 26 Nov 2021 21:23:46 +0000 (21:23 +0000)
commitec2a589d34e14f6d33fa9e424af4c3e3b83c1095
treeca2f807e725486358f187cb5874e25bdbd84862e
parenta570acf2a183425adbfedfeea9755c92164dcbaf
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>
cc: linux-cachefs@redhat.com
fs/cachefiles/Makefile
fs/cachefiles/cache.c [new file with mode: 0644]
fs/cachefiles/daemon.c
fs/cachefiles/internal.h