Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 00/38] lockd: Convert NLMv3 server-side procedures to xdrgen
@ 2026-05-12 18:13 Chuck Lever
  2026-05-12 18:13 ` [PATCH 01/38] lockd: Stop warning on nlm__int__drop_reply in !V4 cast_status Chuck Lever
                   ` (38 more replies)
  0 siblings, 39 replies; 42+ messages in thread
From: Chuck Lever @ 2026-05-12 18:13 UTC (permalink / raw)
  To: Jeff Layton, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
	Trond Myklebust, Anna Schumaker
  Cc: linux-nfs, Chuck Lever

This series finishes the xdrgen migration of lockd's server-side
stack. The companion NLMv4 work landed earlier; here the
remaining hand-written XDR in fs/lockd/xdr.c is retired in
favour of code generated from a new
Documentation/sunrpc/xdr/nlm3.x.

XDR helpers now do wire-format conversion only. NLMv3's
32-bit range limit on TEST conflict-holder byte ranges is
clamped at the proc function rather than inside loff_t_to_s32()
in the encoder. The HP-UX zero-length cookie rewrite that
svcxdr_decode_cookie() has carried since the original kernel
import is dropped on the server side; the generated decoder
reproduces the cookie verbatim, and neither NLM_TEST reply
matching nor CANCEL_MSG depends on the substitution.

A wrapper struct bridges each generated argument type with
lockd's legacy lockd_lock/lockd_cookie/lockd_res internals.
Each handler reaches xdrgen-decoded fields through argp->xdrgen
and the legacy layout through a wrapper member that the handler
populates explicitly, typically in nlm3svc_lookup_file(). The
core lockd helpers and the async callback path operate on the
legacy types unchanged, which is what keeps the conversion
incremental.

.pc_argzero is cleared for every converted procedure: the
generated decoders fill the substructure they own, so the
dispatch layer's zero-memset is no longer needed. The
trade-off is that any wrapper field a handler reads must be
initialized explicitly. lock members are populated by
nlm3svc_lookup_file(), or on the GRANTED path by the new
nlm_lock_to_lockd_lock() helper.

Five NLMv4 fixes at the head of the series and three cleanup
patches at the tail bracket the conversion. The six lockd_
struct renames between them are split out so that each
conversion patch reads as a single concern.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

---
Chuck Lever (38):
      lockd: Stop warning on nlm__int__drop_reply in !V4 cast_status
      lockd: Correct kernel-doc status descriptions for NLMv4 GRANTED
      lockd: Drop locks_init_lock() from nlm4_lock_to_lockd_lock()
      lockd: Translate nlm__int__deadlock in __nlm4svc_proc_lock_msg()
      lockd: Do not monitor when looking up the LOCK_MSG callback host
      Documentation: Add the RPC language description of NLM version 3
      lockd: Rename struct nlm_cookie to lockd_cookie
      lockd: Rename struct nlm_lock to lockd_lock
      lockd: Rename struct nlm_args to lockd_args
      lockd: Rename struct nlm_res to lockd_res
      lockd: Rename struct nlm_reboot to lockd_reboot
      lockd: Rename struct nlm_share to lockd_share
      lockd: Use xdrgen XDR functions for the NLMv3 NULL procedure
      lockd: Use xdrgen XDR functions for the NLMv3 TEST procedure
      lockd: Use xdrgen XDR functions for the NLMv3 LOCK procedure
      lockd: Use xdrgen XDR functions for the NLMv3 CANCEL procedure
      lockd: Use xdrgen XDR functions for the NLMv3 UNLOCK procedure
      lockd: Use xdrgen XDR functions for the NLMv3 GRANTED procedure
      lockd: Refactor nlmsvc_callback()
      lockd: Use xdrgen XDR functions for the NLMv3 TEST_MSG procedure
      lockd: Use xdrgen XDR functions for the NLMv3 LOCK_MSG procedure
      lockd: Use xdrgen XDR functions for the NLMv3 CANCEL_MSG procedure
      lockd: Use xdrgen XDR functions for the NLMv3 UNLOCK_MSG procedure
      lockd: Use xdrgen XDR functions for the NLMv3 GRANTED_MSG procedure
      lockd: Use xdrgen XDR functions for the NLMv3 TEST_RES procedure
      lockd: Use xdrgen XDR functions for the NLMv3 LOCK_RES procedure
      lockd: Use xdrgen XDR functions for the NLMv3 CANCEL_RES procedure
      lockd: Use xdrgen XDR functions for the NLMv3 UNLOCK_RES procedure
      lockd: Use xdrgen XDR functions for the NLMv3 GRANTED_RES procedure
      lockd: Use xdrgen XDR functions for the NLMv3 SM_NOTIFY procedure
      lockd: Convert NLMv3 server-side undefined procedures to xdrgen
      lockd: Use xdrgen XDR functions for the NLMv3 SHARE procedure
      lockd: Use xdrgen XDR functions for the NLMv3 UNSHARE procedure
      lockd: Use xdrgen XDR functions for the NLMv3 NM_LOCK procedure
      lockd: Use xdrgen XDR functions for the NLMv3 FREE_ALL procedure
      lockd: Remove C macros that are no longer used
      lockd: Remove dead code from fs/lockd/xdr.c
      lockd: Unify cast_status

 Documentation/sunrpc/xdr/nlm3.x    |  168 ++++
 fs/lockd/Makefile                  |   19 +-
 fs/lockd/clnt4xdr.c                |   42 +-
 fs/lockd/clntlock.c                |    2 +-
 fs/lockd/clntproc.c                |   14 +-
 fs/lockd/clntxdr.c                 |   44 +-
 fs/lockd/host.c                    |    4 +-
 fs/lockd/lockd.h                   |   57 +-
 fs/lockd/mon.c                     |    2 +-
 fs/lockd/nlm3xdr_gen.c             |  714 ++++++++++++++
 fs/lockd/nlm3xdr_gen.h             |   32 +
 fs/lockd/share.h                   |    4 +-
 fs/lockd/svc4proc.c                |   69 +-
 fs/lockd/svclock.c                 |   38 +-
 fs/lockd/svcproc.c                 | 1844 ++++++++++++++++++++++++------------
 fs/lockd/svcshare.c                |    8 +-
 fs/lockd/svcsubs.c                 |    2 +-
 fs/lockd/svcxdr.h                  |  142 ---
 fs/lockd/trace.h                   |   16 +-
 fs/lockd/xdr.c                     |  354 -------
 fs/lockd/xdr.h                     |   39 +-
 include/linux/sunrpc/xdrgen/nlm3.h |  210 ++++
 22 files changed, 2538 insertions(+), 1286 deletions(-)
---
base-commit: b26490baad0b7318d763b5ad6e5ca2addb20b314
change-id: 20260427-nlm4-xdrgen-35bf1c6869b8

Best regards,
--  
Chuck Lever <chuck.lever@oracle.com>


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2026-05-14 17:57 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 18:13 [PATCH 00/38] lockd: Convert NLMv3 server-side procedures to xdrgen Chuck Lever
2026-05-12 18:13 ` [PATCH 01/38] lockd: Stop warning on nlm__int__drop_reply in !V4 cast_status Chuck Lever
2026-05-12 18:13 ` [PATCH 02/38] lockd: Correct kernel-doc status descriptions for NLMv4 GRANTED Chuck Lever
2026-05-12 18:13 ` [PATCH 03/38] lockd: Drop locks_init_lock() from nlm4_lock_to_lockd_lock() Chuck Lever
2026-05-12 18:13 ` [PATCH 04/38] lockd: Translate nlm__int__deadlock in __nlm4svc_proc_lock_msg() Chuck Lever
2026-05-12 18:13 ` [PATCH 05/38] lockd: Do not monitor when looking up the LOCK_MSG callback host Chuck Lever
2026-05-12 18:13 ` [PATCH 06/38] Documentation: Add the RPC language description of NLM version 3 Chuck Lever
2026-05-12 18:13 ` [PATCH 07/38] lockd: Rename struct nlm_cookie to lockd_cookie Chuck Lever
2026-05-12 18:13 ` [PATCH 08/38] lockd: Rename struct nlm_lock to lockd_lock Chuck Lever
2026-05-12 18:13 ` [PATCH 09/38] lockd: Rename struct nlm_args to lockd_args Chuck Lever
2026-05-12 18:13 ` [PATCH 10/38] lockd: Rename struct nlm_res to lockd_res Chuck Lever
2026-05-12 18:13 ` [PATCH 11/38] lockd: Rename struct nlm_reboot to lockd_reboot Chuck Lever
2026-05-12 18:13 ` [PATCH 12/38] lockd: Rename struct nlm_share to lockd_share Chuck Lever
2026-05-12 18:13 ` [PATCH 13/38] lockd: Use xdrgen XDR functions for the NLMv3 NULL procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 14/38] lockd: Use xdrgen XDR functions for the NLMv3 TEST procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 15/38] lockd: Use xdrgen XDR functions for the NLMv3 LOCK procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 16/38] lockd: Use xdrgen XDR functions for the NLMv3 CANCEL procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 17/38] lockd: Use xdrgen XDR functions for the NLMv3 UNLOCK procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 18/38] lockd: Use xdrgen XDR functions for the NLMv3 GRANTED procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 19/38] lockd: Refactor nlmsvc_callback() Chuck Lever
2026-05-12 18:13 ` [PATCH 20/38] lockd: Use xdrgen XDR functions for the NLMv3 TEST_MSG procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 21/38] lockd: Use xdrgen XDR functions for the NLMv3 LOCK_MSG procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 22/38] lockd: Use xdrgen XDR functions for the NLMv3 CANCEL_MSG procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 23/38] lockd: Use xdrgen XDR functions for the NLMv3 UNLOCK_MSG procedure Chuck Lever
2026-05-12 18:13 ` [PATCH 24/38] lockd: Use xdrgen XDR functions for the NLMv3 GRANTED_MSG procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 25/38] lockd: Use xdrgen XDR functions for the NLMv3 TEST_RES procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 26/38] lockd: Use xdrgen XDR functions for the NLMv3 LOCK_RES procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 27/38] lockd: Use xdrgen XDR functions for the NLMv3 CANCEL_RES procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 28/38] lockd: Use xdrgen XDR functions for the NLMv3 UNLOCK_RES procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 29/38] lockd: Use xdrgen XDR functions for the NLMv3 GRANTED_RES procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 30/38] lockd: Use xdrgen XDR functions for the NLMv3 SM_NOTIFY procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 31/38] lockd: Convert NLMv3 server-side undefined procedures to xdrgen Chuck Lever
2026-05-12 18:14 ` [PATCH 32/38] lockd: Use xdrgen XDR functions for the NLMv3 SHARE procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 33/38] lockd: Use xdrgen XDR functions for the NLMv3 UNSHARE procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 34/38] lockd: Use xdrgen XDR functions for the NLMv3 NM_LOCK procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 35/38] lockd: Use xdrgen XDR functions for the NLMv3 FREE_ALL procedure Chuck Lever
2026-05-12 18:14 ` [PATCH 36/38] lockd: Remove C macros that are no longer used Chuck Lever
2026-05-12 18:14 ` [PATCH 37/38] lockd: Remove dead code from fs/lockd/xdr.c Chuck Lever
2026-05-12 18:14 ` [PATCH 38/38] lockd: Unify cast_status Chuck Lever
2026-05-14 16:52 ` [PATCH 00/38] lockd: Convert NLMv3 server-side procedures to xdrgen Jeff Layton
2026-05-14 17:53   ` Chuck Lever
2026-05-14 17:57     ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox