fuse: Introduce a new notification type for resend pending requests
authorZhao Chen <winters.zc@antgroup.com>
Tue, 9 Jan 2024 09:24:42 +0000 (17:24 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 6 Mar 2024 08:56:34 +0000 (09:56 +0100)
commit760eac73f9f69aa28fcb3050b4946c2dcc656d12
tree95d8249763862237a33539627cee62a5467d85b3
parente022f6a1c711ab6d76e9e59dce77e2b25df75076
fuse: Introduce a new notification type for resend pending requests

When a FUSE daemon panics and failover, we aim to minimize the impact on
applications by reusing the existing FUSE connection. During this process,
another daemon is employed to preserve the FUSE connection's file
descriptor. The new started FUSE Daemon will takeover the fd and continue
to provide service.

However, it is possible for some inflight requests to be lost and never
returned. As a result, applications awaiting replies would become stuck
forever. To address this, we can resend these pending requests to the
new started FUSE daemon.

This patch introduces a new notification type "FUSE_NOTIFY_RESEND", which
can trigger resending of the pending requests, ensuring they are properly
processed again.

Signed-off-by: Zhao Chen <winters.zc@antgroup.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c
include/uapi/linux/fuse.h