[RFC PATCH v1 0/5] fuse: caches documentation and testing
From: Luis Henriques
Date: Wed Jul 08 2026 - 09:13:44 EST
Hi!
FUSE uses several different types of caches: directory, symlink, attributes,
ACLs, etc. This RFC includes an attempt at documenting the usage of these
caches, in particular the rules for inserting/removing/revalidating data
into them. The idea for this document came from Miklos during this year's
LSFMM -- he would like to see caches usage documented before he could merge
an initial version of fusex.
This is an early version of this document, which includes only two caches:
symlinks and ACLs. Further caches will follow, assuming the proposed format
is acceptable.
In the meantime, while (slowly) working on this document, it became clear
that another useful thing to have would be some test cases that could
validate it. And which could also be used as regression tests, of course.
Thus I'm also adding 2 very basic kselftests for these caches. For now they
only do the obvious validation for whether caching is working or not, but
they can be extended to further validate different behaviours.
Finally, since the only existing FUSE kselftest is still using fuse2, I'm
also proposing to modify it so that it uses fuse3 instead. There's the risk
this may be breaking some existing QA, but maybe that's an acceptable risk
(after all, fuse3 has around for ~10 years now!).
Anyway, this is an RFC for all the above. Any feedback is welcome, as I
start looking into other cache types.
Luis Henriques (5):
Documentation: fuse: add document on caches being used by FUSE
selftests/filesystems: convert fusectl test to fuse3
selftests/filesystems: check that fusectlfs is mounted
selftests/filesystems: add fuse symlink caching test
selftests/filesystems: add fuse ACLs caching test
.../filesystems/fuse/fuse-caches.rst | 86 +++++++
.../selftests/filesystems/fuse/.gitignore | 3 +
.../selftests/filesystems/fuse/Makefile | 23 +-
.../selftests/filesystems/fuse/acl_fs.c | 216 ++++++++++++++++++
.../selftests/filesystems/fuse/acl_test.sh | 66 ++++++
.../selftests/filesystems/fuse/fuse_mnt.c | 17 +-
.../selftests/filesystems/fuse/fusectl_test.c | 7 +
.../selftests/filesystems/fuse/setgetacl.c | 62 +++++
.../selftests/filesystems/fuse/symlink_fs.c | 115 ++++++++++
.../filesystems/fuse/symlink_test.sh | 52 +++++
10 files changed, 635 insertions(+), 12 deletions(-)
create mode 100644 Documentation/filesystems/fuse/fuse-caches.rst
create mode 100644 tools/testing/selftests/filesystems/fuse/acl_fs.c
create mode 100755 tools/testing/selftests/filesystems/fuse/acl_test.sh
create mode 100644 tools/testing/selftests/filesystems/fuse/setgetacl.c
create mode 100644 tools/testing/selftests/filesystems/fuse/symlink_fs.c
create mode 100755 tools/testing/selftests/filesystems/fuse/symlink_test.sh