summaryrefslogtreecommitdiff
path: root/include/linux/errqueue.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2026-05-12 21:13:53 +0300
committerChuck Lever <cel@kernel.org>2026-06-09 23:32:59 +0300
commite04d248b8a1e90df2bbb9c8a06fa34024ee9bdf0 (patch)
treed55ebfc87d652b2aa41db19d5e7b7d5958d7dcad /include/linux/errqueue.h
parent1b0490e6a0849f2f9e9bd901a8a151368f57030f (diff)
downloadlinux-e04d248b8a1e90df2bbb9c8a06fa34024ee9bdf0.tar.xz
lockd: Use xdrgen XDR functions for the NLMv3 GRANTED procedure
The NLM GRANTED procedure allows servers to notify clients when a previously blocked lock request has been granted, completing the asynchronous lock request flow. This patch converts the NLMv3 GRANTED procedure to use xdrgen-generated XDR functions. The conversion replaces the legacy decoder with the xdrgen functions nlm_svc_decode_nlm_testargs and nlm_svc_encode_nlm_res generated from the NLM version 3 protocol specification. The procedure handler accesses xdrgen types through a wrapper structure that bridges between generated code and the legacy lockd_lock representation still used by the core lockd logic. A new helper function nlm_lock_to_lockd_lock() converts an xdrgen nlm_lock into the legacy lockd_lock format. The helper complements the existing nlm3svc_lookup_host() and nlm3svc_lookup_file() functions used throughout this series. Setting pc_argzero to zero is safe because the generated decoder fills the argp->xdrgen subfields before the procedure runs, so the zeroing memset performed by the dispatch layer is not needed. The helper populates each field of the wrapper's lock member that any downstream consumer reads: fh, oh, svid, and the file_lock byte range. Because pc_argzero no longer scrubs the rq_argp slot, the shared nlmclnt_lock_event tracepoint class is updated to source its byte-range fields from lock->fl.fl_start and lock->fl.fl_end, which both the client and server populate unconditionally; the old lock_start and lock_len fields are no longer required by the trace. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions