libfuse: add support for FUSE_NOTIFY_RESEND
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | fuse_lowlevel: add support for FUSE_NOTIFY_RESENDChangeLog.rst doc/ include/ +4 more | +75 | 0 replies | |
| 2/2 | test: exercise FUSE_NOTIFY_RESENDtest/ test/ test/ | +237 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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