From: Bernd Schubert <[email protected]>
To: Miklos Szeredi <[email protected]>
Cc: Jens Axboe <[email protected]>,
Pavel Begunkov <[email protected]>,
[email protected], [email protected],
Joanne Koong <[email protected]>,
Josef Bacik <[email protected]>,
Amir Goldstein <[email protected]>,
Ming Lei <[email protected]>, David Wei <[email protected]>,
[email protected], Luis Henriques <[email protected]>,
Dan Carpenter <[email protected]>,
Bernd Schubert <[email protected]>
Subject: [PATCH v11 17/18] fuse: prevent disabling io-uring on active connections
Date: Thu, 23 Jan 2025 15:51:16 +0100 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
The enable_uring module parameter allows administrators to enable/disable
io-uring support for FUSE at runtime. However, disabling io-uring while
connections already have it enabled can lead to an inconsistent state.
Fix this by keeping io-uring enabled on connections that were already using
it, even if the module parameter is later disabled. This ensures active
FUSE mounts continue to function correctly.
Signed-off-by: Bernd Schubert <[email protected]>
---
fs/fuse/dev_uring.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
index 5a44de5d647ee7259ed9a750d0184deebca1de19..b67bde903c126fcd1426771b4a96071fc37fffba 100644
--- a/fs/fuse/dev_uring.c
+++ b/fs/fuse/dev_uring.c
@@ -1092,11 +1092,6 @@ int __maybe_unused fuse_uring_cmd(struct io_uring_cmd *cmd,
u32 cmd_op = cmd->cmd_op;
int err;
- if (!enable_uring) {
- pr_info_ratelimited("fuse-io-uring is disabled\n");
- return -EOPNOTSUPP;
- }
-
if ((unlikely(issue_flags & IO_URING_F_CANCEL))) {
fuse_uring_cancel(cmd, issue_flags);
return 0;
@@ -1113,6 +1108,12 @@ int __maybe_unused fuse_uring_cmd(struct io_uring_cmd *cmd,
}
fc = fud->fc;
+ /* Once a connection has io-uring enabled on it, it can't be disabled */
+ if (!enable_uring && !fc->io_uring) {
+ pr_info_ratelimited("fuse-io-uring is disabled\n");
+ return -EOPNOTSUPP;
+ }
+
if (fc->aborted)
return -ECONNABORTED;
if (!fc->connected)
--
2.43.0
next prev parent reply other threads:[~2025-01-23 14:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 14:50 [PATCH v11 00/18] fuse: fuse-over-io-uring Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 01/18] fuse: rename to fuse_dev_end_requests and make non-static Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 02/18] fuse: Move fuse_get_dev to header file Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 03/18] fuse: Move request bits Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 04/18] fuse: Add fuse-io-uring design documentation Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 05/18] fuse: make args->in_args[0] to be always the header Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 06/18] fuse: {io-uring} Handle SQEs - register commands Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 07/18] fuse: Make fuse_copy non static Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 08/18] fuse: Add fuse-io-uring handling into fuse_copy Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 09/18] fuse: {io-uring} Make hash-list req unique finding functions non-static Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 10/18] fuse: Add io-uring sqe commit and fetch support Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 11/18] fuse: {io-uring} Handle teardown of ring entries Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 12/18] fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 13/18] fuse: Allow to queue fg requests through io-uring Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 14/18] fuse: Allow to queue bg " Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 15/18] fuse: {io-uring} Prevent mount point hang on fuse-server termination Bernd Schubert
2025-01-23 14:51 ` [PATCH v11 16/18] fuse: block request allocation until io-uring init is complete Bernd Schubert
2025-01-23 14:51 ` Bernd Schubert [this message]
2025-01-23 14:51 ` [PATCH v11 18/18] fuse: enable fuse-over-io-uring Bernd Schubert
2025-01-23 14:53 ` [PATCH v11 00/18] fuse: fuse-over-io-uring Bernd Schubert
2025-01-23 14:59 ` Miklos Szeredi
2025-01-23 15:02 ` Bernd Schubert
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=20250123-fuse-uring-for-6-10-rfc4-v11-17-11e9cecf4cfb@ddn.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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