Skip to content

libfuse: add support for FUSE_NOTIFY_RESEND

Baokun Li fuse-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fuse_lowlevel: add support for FUSE_NOTIFY_RESENDChangeLog.rst doc/README.notifications include/fuse_common.h +4 more+75 -10 replies
2/2test: exercise FUSE_NOTIFY_RESENDtest/cases/ctests/notify-resend.sh test/meson.build test/test_notify_resend.c+237 -05 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] libfuse: add support for FUSE_NOTIFY_RESEND

Hi all,

The FUSE kernel driver supports re-queuing requests that were already sent to a daemon but never answered, e.g. to recover in-flight requests after a daemon takeover. The kernel side was added in Linux 6.9, protocol 7.40 (FUSE_NOTIFY_RESEND / FUSE_HAS_RESEND), but libfuse has no way to use it yet.

Patch 1 adds fuse_lowlevel_notify_resend() to send the notification, exposes kernel support through the new FUSE_CAP_HAS_RESEND capability and adds fuse_req_is_resend() so that file systems can detect resent requests via the FUSE_UNIQUE_RESEND bit in the request ID and handle them idempotently.

Patch 2 adds a self-contained regression test: the daemon drops the first GETATTR of a file, triggers a resend and expects the request to come back with FUSE_UNIQUE_RESEND set before answering it.

Testing
=======

The new test passes on Linux 7.3-rc3 (protocol 7.46). It skips on kernels without FUSE_HAS_RESEND support and over the io-uring transport, which recovers requests on its own.

Comments and questions are, as always, welcome.

Thanks,
Baokun

Baokun Li (2):
fuse_lowlevel: add support for FUSE_NOTIFY_RESEND
test: exercise FUSE_NOTIFY_RESEND

 ChangeLog.rst                      |   7 +
 doc/README.notifications           |   2 +-
 include/fuse_common.h              |  13 ++
 include/fuse_lowlevel.h            |  28 ++++
 lib/fuse_cap_names_i.h             |   1 +
 lib/fuse_lowlevel.c                |  23 +++
 lib/fuse_versionscript             |   2 +
 test/cases/ctests/notify-resend.sh |  18 +++
 test/meson.build                   |   3 +
 test/test_notify_resend.c          | 216 +++++++++++++++++++++++++++++
 10 files changed, 312 insertions(+), 1 deletion(-)
 create mode 100755 test/cases/ctests/notify-resend.sh
 create mode 100644 test/test_notify_resend.c

base-commit: cb2e761c763559f40e41090aabf008f665f27889

Signature · 1 line
2.43.7