History

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.

Zhao Chen committed 2 years ago

Commit 760eac71 parent e022f6a2 files · +58 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/fuse.h+2−0
@@ -216,6 +216,7 @@ · 215 unmodified lines
216 * - add max_stack_depth to fuse_init_out, add FUSE_PASSTHROUGH init flag216 * - add max_stack_depth to fuse_init_out, add FUSE_PASSTHROUGH init flag
217 * - add backing_id to fuse_open_out, add FOPEN_PASSTHROUGH open flag217 * - add backing_id to fuse_open_out, add FOPEN_PASSTHROUGH open flag
218 * - add FUSE_NO_EXPORT_SUPPORT init flag218 * - add FUSE_NO_EXPORT_SUPPORT init flag
219 * - add FUSE_NOTIFY_RESEND
219 */220 */
220 221
221#ifndef _LINUX_FUSE_H222#ifndef _LINUX_FUSE_H
@@ -645,6 +646,7 @@ enum fuse_notify_code { · 423 unmodified lines
645 FUSE_NOTIFY_STORE = 4,646 FUSE_NOTIFY_STORE = 4,
646 FUSE_NOTIFY_RETRIEVE = 5,647 FUSE_NOTIFY_RETRIEVE = 5,
647 FUSE_NOTIFY_DELETE = 6,648 FUSE_NOTIFY_DELETE = 6,
649 FUSE_NOTIFY_RESEND = 7,
648 FUSE_NOTIFY_CODE_MAX,650 FUSE_NOTIFY_CODE_MAX,
649};651};
650 652