[PATCHSET RFC v5 2/6] libfuse: allow servers to use iomap for better file IO performance

Darrick J. Wong
2025-09-16T00:20:39Z

Hi all,

This series connects libfuse to the iomap-enabled fuse driver in Linux to get
fuse servers out of the business of handling file I/O themselves. By keeping
the IO path mostly within the kernel, we can dramatically improve the speed of
disk-based filesystems. This enables us to move all the filesystem metadata
parsing code out of the kernel and into userspace, which means that we can
containerize them for security without losing a lot of performance.

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-fileio
---
Commits in this patchset:
* libfuse: bump kernel and library ABI versions
* libfuse: add kernel gates for FUSE_IOMAP
* libfuse: add fuse commands for iomap_begin and end
* libfuse: add upper level iomap commands
* libfuse: add a lowlevel notification to add a new device to iomap
* libfuse: add upper-level iomap add device function
* libfuse: add iomap ioend low level handler
* libfuse: add upper level iomap ioend commands
* libfuse: add a reply function to send FUSE_ATTR_* to the kernel
* libfuse: connect high level fuse library to fuse_reply_attr_iflags
* libfuse: support direct I/O through iomap
* libfuse: don't allow hardlinking of iomap files in the upper level fuse library
* libfuse: allow discovery of the kernel's iomap capabilities
* libfuse: add lower level iomap_config implementation
* libfuse: add upper level iomap_config implementation
* libfuse: add low level code to invalidate iomap block device ranges
* libfuse: add upper-level API to invalidate parts of an iomap block device
* libfuse: add atomic write support
---
include/fuse.h | 86 ++++++++
include/fuse_common.h | 136 +++++++++++++
include/fuse_kernel.h | 118 +++++++++++
include/fuse_lowlevel.h | 243 ++++++++++++++++++++++++
ChangeLog.rst | 12 +
lib/fuse.c | 484 ++++++++++++++++++++++++++++++++++++++++++-----
lib/fuse_lowlevel.c | 377 +++++++++++++++++++++++++++++++++++--
lib/fuse_versionscript | 20 ++
lib/meson.build | 2
meson.build | 2
10 files changed, 1405 insertions(+), 75 deletions(-)