]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
cachefiles: Implement culling daemon commands
authorDavid Howells <dhowells@redhat.com>
Thu, 21 Oct 2021 07:50:10 +0000 (08:50 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 26 Nov 2021 21:23:47 +0000 (21:23 +0000)
commit8012acd55f0aefe98545df1c2ba56ae545257ab6
tree6b94a946101bd822d634a424af4c7077b86bfa03
parent8af01449d1bc18c86c66c0374355967520f2a816
cachefiles: Implement culling daemon commands

Implement the ability for the userspace daemon to try and cull a file or
directory in the cache.  Two daemon commands are implemented:

 (1) The "inuse" command.  This queries if a file is in use or whether it
     can be deleted.  It checks the S_KERNEL_FILE flag on the inode
     referred to by the specified filename.

 (2) The "cull" command.  This asks for a file or directory to be removed,
     where removal means either unlinking it or moving it to the graveyard
     directory for userspace to dismantle.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-cachefs@redhat.com
fs/cachefiles/daemon.c
fs/cachefiles/internal.h
fs/cachefiles/namei.c