From 84a27de6a644163eda97b7052e064774ec73f925 Mon Sep 17 00:00:00 2001 From: Joanne Koong Date: Wed, 17 Jul 2024 13:42:14 -0700 Subject: Support request timeouts This adds the libfuse changes needed to support request timeouts. A timeout may be set by the server in its init call. If a request is not completed by the timeout, the connection will be aborted by the kernel. Signed-off-by: Joanne Koong --- lib/fuse_lowlevel.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/fuse_lowlevel.c') diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index e10b937..619edfc 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -2720,6 +2720,11 @@ _do_init(fuse_req_t req, const fuse_ino_t nodeid, const void *op_in, enable_io_uring = true; } + if ((inargflags & FUSE_REQUEST_TIMEOUT) && se->conn.request_timeout) { + outargflags |= FUSE_REQUEST_TIMEOUT; + outarg.request_timeout = se->conn.request_timeout; + } + if (inargflags & FUSE_INIT_EXT) { outargflags |= FUSE_INIT_EXT; outarg.flags2 = outargflags >> 32; -- cgit v1.2.3