diff options
author | Bernd Schubert <bschubert@ddn.com> | 2025-07-20 15:51:55 +0200 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-07-22 14:47:12 +0200 |
commit | e915a28ec44ba0f5345eed9985e862ebe13104cb (patch) | |
tree | ceeefcca95a41fccb911728c3508cbeb553709c1 /lib/fuse_lowlevel.c | |
parent | 2f092ef1084fe72c6cc26a8cde61ee94329c2f34 (diff) | |
download | libfuse-e915a28ec44ba0f5345eed9985e862ebe13104cb.tar.gz |
Split fuse-io-uring startup
Start the ring threads before sending fuse_reply_ok() so
that io-uring startup issues can be non-fatal.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r-- | lib/fuse_lowlevel.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 9731b44..6afcecd 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -2897,18 +2897,22 @@ _do_init(fuse_req_t req, const fuse_ino_t nodeid, const void *op_in, else if (arg->minor < 23) outargsize = FUSE_COMPAT_22_INIT_OUT_SIZE; - send_reply_ok(req, &outarg, outargsize); - - /* XXX: Split the start, and send SQEs only after send_reply_ok() */ + /* XXX: Add an option to make non-available io-uring fatal */ if (enable_io_uring) { int ring_rc = fuse_uring_start(se); if (ring_rc != 0) { - fuse_log(FUSE_LOG_ERR, "fuse: failed to start io-uring: %s\n", + fuse_log(FUSE_LOG_INFO, + "fuse: failed to start io-uring: %s\n", strerror(ring_rc)); - fuse_session_exit(se); + outargflags &= ~FUSE_OVER_IO_URING; + enable_io_uring = false; } } + + send_reply_ok(req, &outarg, outargsize); + if (enable_io_uring) + fuse_uring_wake_ring_threads(se); } static __attribute__((no_sanitize("thread"))) void |