]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
vfs, cachefiles: Mark a backing file in use with an inode flag
authorDavid Howells <dhowells@redhat.com>
Thu, 18 Nov 2021 08:58:08 +0000 (08:58 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 26 Nov 2021 21:23:46 +0000 (21:23 +0000)
commitd5ac0f7ba8088aac254a131664a440166b84f119
treeb3e530318816e4c377de69d1c8c8b020f5130690
parentec2a589d34e14f6d33fa9e424af4c3e3b83c1095
vfs, cachefiles: Mark a backing file in use with an inode flag

Use an inode flag, S_KERNEL_FILE, to mark that a backing file is in use by
the kernel to prevent cachefiles or other kernel services from interfering
with that file.

Alter rmdir to reject attempts to remove a directory marked with this flag.
This is used by cachefiles to prevent cachefilesd from removing them.

Using S_SWAPFILE instead isn't really viable as that has other effects in
the I/O paths.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/cachefiles/Makefile
fs/cachefiles/namei.c [new file with mode: 0644]
fs/namei.c
include/trace/events/cachefiles.h