On 1/7/25 00:25, Bernd Schubert wrote:
When the fuse-server terminates while the fuse-client or kernel
still has queued URING_CMDs, these commands retain references
to the struct file used by the fuse connection. This prevents
fuse_dev_release() from being invoked, resulting in a hung mount
point.
lgtm
Reviewed-by: Pavel Begunkov <asml.silence@xxxxxxxxx> # io_uring
This patch addresses the issue by making queued URING_CMDs
cancelable, allowing fuse_dev_release() to proceed as expected
and preventing the mount point from hanging.
Signed-off-by: Bernd Schubert <bschubert@xxxxxxx>
---
fs/fuse/dev.c | 2 ++
fs/fuse/dev_uring.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++---
fs/fuse/dev_uring_i.h | 9 +++++++
3 files changed, 79 insertions(+), 3 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index afafa960d4725d9b64b22f17bf09c846219396d6..1b593b23f7b8c319ec38c7e726dabf516965500e 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -599,8 +599,10 @@ static int fuse_request_queue_background(struct fuse_req *req)
}
__set_bit(FR_ISREPLY, &req->flags);
+#ifdef CONFIG_FUSE_IO_URING
if (fuse_uring_ready(fc))
return fuse_request_queue_background_uring(fc, req);
+#endif
Looks like it should've been a part of some earlier commit.
spin_lock(&fc->bg_lock);
if (likely(fc->connected)) {
--
Pavel Begunkov