]> www.infradead.org Git - users/hch/misc.git/commit
NFSD: Implement CB_SEQUENCE referring call lists
authorChuck Lever <chuck.lever@oracle.com>
Sat, 1 Mar 2025 18:31:49 +0000 (13:31 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 11 May 2025 23:48:20 +0000 (19:48 -0400)
commit4f3c8d8c9e109655311bbb4c6c46a54a9ef90d99
tree16304bc9a2b547e470326cab080300737f594dac
parent71aeab7bd9ae113e7550fd78a9e6ad99a700f8bc
NFSD: Implement CB_SEQUENCE referring call lists

We have yet to implement a mechanism in NFSD for resolving races
between a server's reply and a related callback operation. For
example, a CB_OFFLOAD callback can race with the matching COPY
response. The client will not recognize the copy state ID in the
CB_OFFLOAD callback until the COPY response arrives.

Trond adds:
> It is also needed for the same kind of race with delegation
> recalls, layout recalls, CB_NOTIFY_DEVICEID and would also be
> helpful (although not as strongly required) for CB_NOTIFY_LOCK.

RFC 8881 Section 20.9.3 describes referring call lists this way:
> The csa_referring_call_lists array is the list of COMPOUND
> requests, identified by session ID, slot ID, and sequence ID.
> These are requests that the client previously sent to the server.
> These previous requests created state that some operation(s) in
> the same CB_COMPOUND as the csa_referring_call_lists are
> identifying. A session ID is included because leased state is tied
> to a client ID, and a client ID can have multiple sessions. See
> Section 2.10.6.3.

Introduce the XDR infrastructure for populating the
csa_referring_call_lists argument of CB_SEQUENCE. Subsequent patches
will put the referring call list to use.

Note that cb_sequence_enc_sz estimates that only zero or one rcl is
included in each CB_SEQUENCE, but the new infrastructure can
manage any number of referring calls.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4callback.c
fs/nfsd/state.h
fs/nfsd/xdr4cb.h