There are situations where fuse servers can become unresponsive or take too long to reply to a request. Currently there is no upper bound on how long a request may take, which may be frustrating to users who get stuck waiting for a request to complete. This patchset adds a timeout option for requests and two dynamically configurable fuse sysctls "default_request_timeout" and "max_request_timeout" for controlling/enforcing timeout behavior system-wide. Existing fuse servers will not be affected unless they explicitly opt into the timeout. v1: https://lore.kernel.org/linux-fsdevel/20240717213458.1613347-1-joannelkoong@xxxxxxxxx/ Changes from v1: - Add timeout for background requests - Handle resend race condition - Add sysctls Joanne Koong (2): fuse: add optional kernel-enforced timeout for requests fuse: add default_request_timeout and max_request_timeout sysctls Documentation/admin-guide/sysctl/fs.rst | 17 +++ fs/fuse/Makefile | 2 +- fs/fuse/dev.c | 187 +++++++++++++++++++++++- fs/fuse/fuse_i.h | 30 ++++ fs/fuse/inode.c | 24 +++ fs/fuse/sysctl.c | 42 ++++++ 6 files changed, 293 insertions(+), 9 deletions(-) create mode 100644 fs/fuse/sysctl.c -- 2.43.0