From: Chunsheng Luo <luochunsheng@ustc.edu>
To: miklos@szeredi.hu
Cc: amir73il@gmail.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Chunsheng Luo <luochunsheng@ustc.edu>
Subject: [PATCH v2 0/2] fuse/passthrough: simplify daemon crash recovery
Date: Fri, 16 Jan 2026 22:28:43 +0800 [thread overview]
Message-ID: <20260116142845.422-1-luochunsheng@ustc.edu> (raw)
Hello maintainers and community,
This patch series addresses crash recovery issues for FUSE daemons
with passthrough support, following up on the previous RFC
discussion [1].
Problem Summary
===============
To simplify FUSE daemon crash recovery and reduce performance
overhead, passthrough backing_id information is not persisted.
However, this design choice introduces two issues when the daemon
restarts:
1. Non-persistent backing_ids prevent proper resource cleanup during
daemon restart, potentially causing resource leaks.
2. New backing_ids allocated for the same backing file trigger -EIO
errors due to strict pointer validation in
fuse_inode_uncached_io_start(), even though the backing inodes
are identical.
Changes from RFC v1
===================
Based on Amir Goldstein's suggestion, this v2 series implements:
Patch 1/2: "fuse: introduce close-all ioctl for passthrough backing
cleanup"
- Replaces the magic -1 value with a dedicated
FUSE_DEV_IOC_BACKING_CLOSE_ALL ioctl for comprehensive cleanup
during daemon restart.
Patch 2/2: "fuse: relax backing inode validation for crash recovery"
- Drops the FOPEN_PASSTHROUGH_INODE_CACHE flag approach.
- Modifies fuse_inode_uncached_io_start() to compare backing
inodes instead of fuse_backing pointers, allowing safe reuse
of identical backing files after recovery.
Testing
=======
The patches have been tested with FUSE daemon crash and recovery
scenarios on kernel 6.19-rc4, successfully resolving the -EIO
errors and backing file resource leaks.
This approach maintains the simplicity of non-persistent backing_ids
while ensuring proper recovery semantics.
Thank you for your review and previous guidance.
[1] https://lore.kernel.org/linux-fsdevel/20260115072032.402-1-luochunsheng@ustc.edu/
---
Chunsheng Luo (2):
fuse: add ioctl to cleanup all backing files
fuse: Relax backing file validation to compare backing inodes
fs/fuse/backing.c | 19 +++++++++++++++++++
fs/fuse/dev.c | 16 ++++++++++++++++
fs/fuse/fuse_i.h | 1 +
fs/fuse/iomode.c | 2 +-
include/uapi/linux/fuse.h | 1 +
5 files changed, 38 insertions(+), 1 deletion(-)
--
2.43.0
next reply other threads:[~2026-01-16 14:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 14:28 Chunsheng Luo [this message]
2026-01-16 14:28 ` [PATCH 1/2] fuse: add ioctl to cleanup all backing files Chunsheng Luo
2026-01-16 15:39 ` Amir Goldstein
2026-01-17 16:14 ` Chunsheng Luo
2026-01-17 17:00 ` Amir Goldstein
2026-01-18 11:47 ` Chunsheng Luo
2026-01-18 17:07 ` Amir Goldstein
2026-01-18 17:08 ` Amir Goldstein
2026-01-19 2:44 ` Chunsheng Luo
2026-01-16 14:28 ` [PATCH 2/2] fuse: Relax backing file validation to compare backing inodes Chunsheng Luo
2026-01-16 15:07 ` Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260116142845.422-1-luochunsheng@ustc.edu \
--to=luochunsheng@ustc.edu \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®