Notes about FUSE Passthrough
本文将mark下FUSE Passthrough的相关notes。
Overview
FUSE (Filesystem in Userspace) passthrough is a feature designed to improve the performance of FUSE filesystems for I/O operations. Typically, FUSE operations involve communication between the kernel and a userspace FUSE daemon, which can incur overhead. Passthrough allows certain operations on a FUSE file to bypass the userspace daemon and be executed directly by the kernel on an underlying “backing file”.

What
FUSE Passthrough 是一种为 FUSE 文件系统加速数据 I/O 的机制。
普通 FUSE 中,即使 daemon 最终只是读写本地的另一个文件,每次 read()、write() 都需要在内核和用户态 daemon 之间往返:
1 | 应用程序 |
开启 FUSE Passthrough 后,daemon 可以在打开文件时告诉内核:
这个 FUSE 文件对应底层的哪个 backing file。后续数据读写可以直接访问它,不必再把每个请求发给我。
于是路径变成:
1 | OPEN / CREATE |
可以把它概括为:
文件系统控制面仍在用户态 daemon,文件数据面可以下沉到内核。
总结
FUSE Passthrough 的核心不是绕过整个 FUSE 文件系统,而是:
1 | 路径、打开、权限、映射和元数据 |
它保留了 FUSE 灵活的用户态控制能力,同时避开了高频数据 I/O 的用户态往返开销。
个人总结: 思想类似于vhost
参考资料: