From 538b51feedbcdcd78beefd7517ff19c77c4e4526 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Tue, 15 Apr 2025 20:13:47 +0200 Subject: Add fuse_req_is_uring() to check if a req comes through io-uring This might be useful to optimize code paths. For example, with io-uring the request buffer is valid until the request is replied to, while without io-uring the request buffer is only valid in current thread context. Signed-off-by: Bernd Schubert --- 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 ad36414..c7cbebd 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -3157,6 +3157,11 @@ int fuse_req_interrupted(fuse_req_t req) return interrupted; } +bool fuse_req_is_uring(fuse_req_t req) +{ + return req->is_uring; +} + static struct { void (*func)(fuse_req_t req, const fuse_ino_t node, const void *arg); const char *name; -- cgit v1.2.3