[PATCHSET RFC v5 4/6] libfuse: implement syncfs

Darrick J. Wong
2025-09-16T00:21:10Z

Hi all,

Implement syncfs in libfuse so that iomap-compatible fuse servers can
receive syncfs commands, and enable fuse servers to transmit inode
flags to the kernel so that it can enforce sync, immutable, and append.
Also enable some of the timestamp update mount options.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=fuse-iomap-attrs
---
Commits in this patchset:
* libfuse: add strictatime/lazytime mount options
* libfuse: set sync, immutable, and append when loading files
* libfuse: wire up FUSE_SYNCFS to the low level library
* libfuse: add syncfs support to the upper library
---
include/fuse.h | 5 +++++
include/fuse_common.h | 6 ++++++
include/fuse_kernel.h | 8 ++++++++
include/fuse_lowlevel.h | 16 ++++++++++++++++
lib/fuse.c | 31 +++++++++++++++++++++++++++++++
lib/fuse_lowlevel.c | 25 +++++++++++++++++++++++++
lib/mount.c | 18 ++++++++++++++++--
7 files changed, 107 insertions(+), 2 deletions(-)