]> git.ipfire.org Git - thirdparty/linux.git/commit
fuse: add more control over cache invalidation behaviour
authorLuis Henriques <luis@igalia.com>
Wed, 26 Feb 2025 09:14:51 +0000 (09:14 +0000)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 15 Apr 2025 10:56:40 +0000 (12:56 +0200)
commit2396356a945bb022aff02656f59c2a45d457043f
treeaa65795d0a7b4276cab2a8b0abb2912206a4c3e1
parentfaa794dd2e17e74cc0c8fdb6742dfb6ca3c182d0
fuse: add more control over cache invalidation behaviour

Currently userspace is able to notify the kernel to invalidate the cache
for an inode.  This means that, if all the inodes in a filesystem need to
be invalidated, then userspace needs to iterate through all of them and do
this kernel notification separately.

This patch adds the concept of 'epoch': each fuse connection will have the
current epoch initialized and every new dentry will have it's d_time set to
the current epoch value.  A new operation will then allow userspace to
increment the epoch value.  Every time a dentry is d_revalidate()'ed, it's
epoch is compared with the current connection epoch and invalidated if it's
value is different.

Signed-off-by: Luis Henriques <luis@igalia.com>
Tested-by: Laura Promberger <laura.promberger@cern.ch>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/fuse/inode.c
fs/fuse/readdir.c
include/uapi/linux/fuse.h