public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NFSD: Put cache get-reqs dump attrs under reply
@ 2026-04-23 17:17 Chuck Lever
  2026-04-23 17:24 ` Thorsten Leemhuis
  0 siblings, 1 reply; 8+ messages in thread
From: Chuck Lever @ 2026-04-23 17:17 UTC (permalink / raw)
  To: linux, NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo,
	Tom Talpey
  Cc: linux-nfs, Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

The new get-reqs dump operations added to sunrpc_cache.yaml and
nfsd.yaml place the "requests" nested attribute under dump.request.
A netlink dump carries an empty request; its payload travels back
in the reply. Because the spec names no reply attributes, the YNL
C code generator synthesizes a forward reference to a
<op>_rsp struct that is never defined, breaking any consumer of
these specs.

This first surfaced when Thorsten Leemhuis built tools/net/ynl
against -next:

  nfsd-user.h:746: error: field 'obj' has incomplete type
    struct nfsd_svc_export_get_reqs_rsp obj ...
  nfsd-user.h:826: error: field 'obj' has incomplete type
    struct nfsd_expkey_get_reqs_rsp obj ...
  nfsd-user.c:1211: error: 'nfsd_svc_export_get_reqs_rsp_parse'
    undeclared

sunrpc_cache.yaml has the same defect in ip-map-get-reqs and
unix-gid-get-reqs, but nfsd.yaml errors out first in the Makefile's
alphabetical build order and hides the sunrpc failures.

These bugs were introduced by incorrect merge conflict resolution.

Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
Closes: https://lore.kernel.org/linux-nfs/f6a3ca6d-e5cb-4a5c-9af2-8d2b1ce33ef0@leemhuis.info/
Fixes: 1045ccf519ce30 ("sunrpc: add netlink upcall for the auth.unix.ip cache")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 Documentation/netlink/specs/nfsd.yaml         |  4 +--
 Documentation/netlink/specs/sunrpc_cache.yaml |  4 +--
 fs/nfsd/netlink.c                             | 26 +++++--------------
 net/sunrpc/netlink.c                          | 26 +++++--------------
 4 files changed, 16 insertions(+), 44 deletions(-)

diff --git a/Documentation/netlink/specs/nfsd.yaml b/Documentation/netlink/specs/nfsd.yaml
index 17e714ef683d..8f36fadd68f7 100644
--- a/Documentation/netlink/specs/nfsd.yaml
+++ b/Documentation/netlink/specs/nfsd.yaml
@@ -445,7 +445,7 @@ operations:
       attribute-set: svc-export-reqs
       flags: [admin-perm]
       dump:
-          request:
+          reply:
             attributes:
               - requests
     -
@@ -463,7 +463,7 @@ operations:
       attribute-set: expkey-reqs
       flags: [admin-perm]
       dump:
-          request:
+          reply:
             attributes:
               - requests
     -
diff --git a/Documentation/netlink/specs/sunrpc_cache.yaml b/Documentation/netlink/specs/sunrpc_cache.yaml
index 55dabc914dbc..f22ff22b9418 100644
--- a/Documentation/netlink/specs/sunrpc_cache.yaml
+++ b/Documentation/netlink/specs/sunrpc_cache.yaml
@@ -101,7 +101,7 @@ operations:
       attribute-set: ip-map-reqs
       flags: [admin-perm]
       dump:
-          request:
+          reply:
             attributes:
               - requests
     -
@@ -119,7 +119,7 @@ operations:
       attribute-set: unix-gid-reqs
       flags: [admin-perm]
       dump:
-          request:
+          reply:
             attributes:
               - requests
     -
diff --git a/fs/nfsd/netlink.c b/fs/nfsd/netlink.c
index df5b0e2fb286..fbee3676d253 100644
--- a/fs/nfsd/netlink.c
+++ b/fs/nfsd/netlink.c
@@ -88,21 +88,11 @@ static const struct nla_policy nfsd_pool_mode_set_nl_policy[NFSD_A_POOL_MODE_MOD
 	[NFSD_A_POOL_MODE_MODE] = { .type = NLA_NUL_STRING, },
 };
 
-/* NFSD_CMD_SVC_EXPORT_GET_REQS - dump */
-static const struct nla_policy nfsd_svc_export_get_reqs_nl_policy[NFSD_A_SVC_EXPORT_REQS_REQUESTS + 1] = {
-	[NFSD_A_SVC_EXPORT_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_svc_export_nl_policy),
-};
-
 /* NFSD_CMD_SVC_EXPORT_SET_REQS - do */
 static const struct nla_policy nfsd_svc_export_set_reqs_nl_policy[NFSD_A_SVC_EXPORT_REQS_REQUESTS + 1] = {
 	[NFSD_A_SVC_EXPORT_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_svc_export_nl_policy),
 };
 
-/* NFSD_CMD_EXPKEY_GET_REQS - dump */
-static const struct nla_policy nfsd_expkey_get_reqs_nl_policy[NFSD_A_EXPKEY_REQS_REQUESTS + 1] = {
-	[NFSD_A_EXPKEY_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_expkey_nl_policy),
-};
-
 /* NFSD_CMD_EXPKEY_SET_REQS - do */
 static const struct nla_policy nfsd_expkey_set_reqs_nl_policy[NFSD_A_EXPKEY_REQS_REQUESTS + 1] = {
 	[NFSD_A_EXPKEY_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_expkey_nl_policy),
@@ -184,11 +174,9 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
 		.flags	= GENL_CMD_CAP_DO,
 	},
 	{
-		.cmd		= NFSD_CMD_SVC_EXPORT_GET_REQS,
-		.dumpit		= nfsd_nl_svc_export_get_reqs_dumpit,
-		.policy		= nfsd_svc_export_get_reqs_nl_policy,
-		.maxattr	= NFSD_A_SVC_EXPORT_REQS_REQUESTS,
-		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+		.cmd	= NFSD_CMD_SVC_EXPORT_GET_REQS,
+		.dumpit	= nfsd_nl_svc_export_get_reqs_dumpit,
+		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	},
 	{
 		.cmd		= NFSD_CMD_SVC_EXPORT_SET_REQS,
@@ -198,11 +186,9 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
 		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
 	},
 	{
-		.cmd		= NFSD_CMD_EXPKEY_GET_REQS,
-		.dumpit		= nfsd_nl_expkey_get_reqs_dumpit,
-		.policy		= nfsd_expkey_get_reqs_nl_policy,
-		.maxattr	= NFSD_A_EXPKEY_REQS_REQUESTS,
-		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+		.cmd	= NFSD_CMD_EXPKEY_GET_REQS,
+		.dumpit	= nfsd_nl_expkey_get_reqs_dumpit,
+		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	},
 	{
 		.cmd		= NFSD_CMD_EXPKEY_SET_REQS,
diff --git a/net/sunrpc/netlink.c b/net/sunrpc/netlink.c
index 5ccf0967809c..ce09ecc0faa2 100644
--- a/net/sunrpc/netlink.c
+++ b/net/sunrpc/netlink.c
@@ -29,21 +29,11 @@ const struct nla_policy sunrpc_unix_gid_nl_policy[SUNRPC_A_UNIX_GID_EXPIRY + 1]
 	[SUNRPC_A_UNIX_GID_EXPIRY] = { .type = NLA_U64, },
 };
 
-/* SUNRPC_CMD_IP_MAP_GET_REQS - dump */
-static const struct nla_policy sunrpc_ip_map_get_reqs_nl_policy[SUNRPC_A_IP_MAP_REQS_REQUESTS + 1] = {
-	[SUNRPC_A_IP_MAP_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_ip_map_nl_policy),
-};
-
 /* SUNRPC_CMD_IP_MAP_SET_REQS - do */
 static const struct nla_policy sunrpc_ip_map_set_reqs_nl_policy[SUNRPC_A_IP_MAP_REQS_REQUESTS + 1] = {
 	[SUNRPC_A_IP_MAP_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_ip_map_nl_policy),
 };
 
-/* SUNRPC_CMD_UNIX_GID_GET_REQS - dump */
-static const struct nla_policy sunrpc_unix_gid_get_reqs_nl_policy[SUNRPC_A_UNIX_GID_REQS_REQUESTS + 1] = {
-	[SUNRPC_A_UNIX_GID_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_unix_gid_nl_policy),
-};
-
 /* SUNRPC_CMD_UNIX_GID_SET_REQS - do */
 static const struct nla_policy sunrpc_unix_gid_set_reqs_nl_policy[SUNRPC_A_UNIX_GID_REQS_REQUESTS + 1] = {
 	[SUNRPC_A_UNIX_GID_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_unix_gid_nl_policy),
@@ -57,11 +47,9 @@ static const struct nla_policy sunrpc_cache_flush_nl_policy[SUNRPC_A_CACHE_FLUSH
 /* Ops table for sunrpc */
 static const struct genl_split_ops sunrpc_nl_ops[] = {
 	{
-		.cmd		= SUNRPC_CMD_IP_MAP_GET_REQS,
-		.dumpit		= sunrpc_nl_ip_map_get_reqs_dumpit,
-		.policy		= sunrpc_ip_map_get_reqs_nl_policy,
-		.maxattr	= SUNRPC_A_IP_MAP_REQS_REQUESTS,
-		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+		.cmd	= SUNRPC_CMD_IP_MAP_GET_REQS,
+		.dumpit	= sunrpc_nl_ip_map_get_reqs_dumpit,
+		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	},
 	{
 		.cmd		= SUNRPC_CMD_IP_MAP_SET_REQS,
@@ -71,11 +59,9 @@ static const struct genl_split_ops sunrpc_nl_ops[] = {
 		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
 	},
 	{
-		.cmd		= SUNRPC_CMD_UNIX_GID_GET_REQS,
-		.dumpit		= sunrpc_nl_unix_gid_get_reqs_dumpit,
-		.policy		= sunrpc_unix_gid_get_reqs_nl_policy,
-		.maxattr	= SUNRPC_A_UNIX_GID_REQS_REQUESTS,
-		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+		.cmd	= SUNRPC_CMD_UNIX_GID_GET_REQS,
+		.dumpit	= sunrpc_nl_unix_gid_get_reqs_dumpit,
+		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	},
 	{
 		.cmd		= SUNRPC_CMD_UNIX_GID_SET_REQS,
-- 
2.53.0


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

* Re: [PATCH] NFSD: Put cache get-reqs dump attrs under reply
  2026-04-23 17:17 [PATCH] NFSD: Put cache get-reqs dump attrs under reply Chuck Lever
@ 2026-04-23 17:24 ` Thorsten Leemhuis
  2026-04-23 17:26   ` Chuck Lever
  0 siblings, 1 reply; 8+ messages in thread
From: Thorsten Leemhuis @ 2026-04-23 17:24 UTC (permalink / raw)
  To: Chuck Lever, NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo,
	Tom Talpey
  Cc: linux-nfs, Chuck Lever

On 4/23/26 19:17, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> The new get-reqs dump operations added to sunrpc_cache.yaml and
> nfsd.yaml place the "requests" nested attribute under dump.request.
> A netlink dump carries an empty request; its payload travels back
> in the reply. Because the spec names no reply attributes, the YNL
> C code generator synthesizes a forward reference to a
> <op>_rsp struct that is never defined, breaking any consumer of
> these specs.
> 
> This first surfaced when Thorsten Leemhuis built tools/net/ynl
> against -next:

Thx for the quick fix, this makes things work. In case anybody cares:

Tested-by: Thorsten Leemhuis <linux@leemhuis.info>

Ciao, Thorsten

>   nfsd-user.h:746: error: field 'obj' has incomplete type
>     struct nfsd_svc_export_get_reqs_rsp obj ...
>   nfsd-user.h:826: error: field 'obj' has incomplete type
>     struct nfsd_expkey_get_reqs_rsp obj ...
>   nfsd-user.c:1211: error: 'nfsd_svc_export_get_reqs_rsp_parse'
>     undeclared
> 
> sunrpc_cache.yaml has the same defect in ip-map-get-reqs and
> unix-gid-get-reqs, but nfsd.yaml errors out first in the Makefile's
> alphabetical build order and hides the sunrpc failures.
> 
> These bugs were introduced by incorrect merge conflict resolution.
> 
> Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
> Closes: https://lore.kernel.org/linux-nfs/f6a3ca6d-e5cb-4a5c-9af2-8d2b1ce33ef0@leemhuis.info/
> Fixes: 1045ccf519ce30 ("sunrpc: add netlink upcall for the auth.unix.ip cache")
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  Documentation/netlink/specs/nfsd.yaml         |  4 +--
>  Documentation/netlink/specs/sunrpc_cache.yaml |  4 +--
>  fs/nfsd/netlink.c                             | 26 +++++--------------
>  net/sunrpc/netlink.c                          | 26 +++++--------------
>  4 files changed, 16 insertions(+), 44 deletions(-)
> 
> diff --git a/Documentation/netlink/specs/nfsd.yaml b/Documentation/netlink/specs/nfsd.yaml
> index 17e714ef683d..8f36fadd68f7 100644
> --- a/Documentation/netlink/specs/nfsd.yaml
> +++ b/Documentation/netlink/specs/nfsd.yaml
> @@ -445,7 +445,7 @@ operations:
>        attribute-set: svc-export-reqs
>        flags: [admin-perm]
>        dump:
> -          request:
> +          reply:
>              attributes:
>                - requests
>      -
> @@ -463,7 +463,7 @@ operations:
>        attribute-set: expkey-reqs
>        flags: [admin-perm]
>        dump:
> -          request:
> +          reply:
>              attributes:
>                - requests
>      -
> diff --git a/Documentation/netlink/specs/sunrpc_cache.yaml b/Documentation/netlink/specs/sunrpc_cache.yaml
> index 55dabc914dbc..f22ff22b9418 100644
> --- a/Documentation/netlink/specs/sunrpc_cache.yaml
> +++ b/Documentation/netlink/specs/sunrpc_cache.yaml
> @@ -101,7 +101,7 @@ operations:
>        attribute-set: ip-map-reqs
>        flags: [admin-perm]
>        dump:
> -          request:
> +          reply:
>              attributes:
>                - requests
>      -
> @@ -119,7 +119,7 @@ operations:
>        attribute-set: unix-gid-reqs
>        flags: [admin-perm]
>        dump:
> -          request:
> +          reply:
>              attributes:
>                - requests
>      -
> diff --git a/fs/nfsd/netlink.c b/fs/nfsd/netlink.c
> index df5b0e2fb286..fbee3676d253 100644
> --- a/fs/nfsd/netlink.c
> +++ b/fs/nfsd/netlink.c
> @@ -88,21 +88,11 @@ static const struct nla_policy nfsd_pool_mode_set_nl_policy[NFSD_A_POOL_MODE_MOD
>  	[NFSD_A_POOL_MODE_MODE] = { .type = NLA_NUL_STRING, },
>  };
>  
> -/* NFSD_CMD_SVC_EXPORT_GET_REQS - dump */
> -static const struct nla_policy nfsd_svc_export_get_reqs_nl_policy[NFSD_A_SVC_EXPORT_REQS_REQUESTS + 1] = {
> -	[NFSD_A_SVC_EXPORT_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_svc_export_nl_policy),
> -};
> -
>  /* NFSD_CMD_SVC_EXPORT_SET_REQS - do */
>  static const struct nla_policy nfsd_svc_export_set_reqs_nl_policy[NFSD_A_SVC_EXPORT_REQS_REQUESTS + 1] = {
>  	[NFSD_A_SVC_EXPORT_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_svc_export_nl_policy),
>  };
>  
> -/* NFSD_CMD_EXPKEY_GET_REQS - dump */
> -static const struct nla_policy nfsd_expkey_get_reqs_nl_policy[NFSD_A_EXPKEY_REQS_REQUESTS + 1] = {
> -	[NFSD_A_EXPKEY_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_expkey_nl_policy),
> -};
> -
>  /* NFSD_CMD_EXPKEY_SET_REQS - do */
>  static const struct nla_policy nfsd_expkey_set_reqs_nl_policy[NFSD_A_EXPKEY_REQS_REQUESTS + 1] = {
>  	[NFSD_A_EXPKEY_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_expkey_nl_policy),
> @@ -184,11 +174,9 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
>  		.flags	= GENL_CMD_CAP_DO,
>  	},
>  	{
> -		.cmd		= NFSD_CMD_SVC_EXPORT_GET_REQS,
> -		.dumpit		= nfsd_nl_svc_export_get_reqs_dumpit,
> -		.policy		= nfsd_svc_export_get_reqs_nl_policy,
> -		.maxattr	= NFSD_A_SVC_EXPORT_REQS_REQUESTS,
> -		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
> +		.cmd	= NFSD_CMD_SVC_EXPORT_GET_REQS,
> +		.dumpit	= nfsd_nl_svc_export_get_reqs_dumpit,
> +		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>  	},
>  	{
>  		.cmd		= NFSD_CMD_SVC_EXPORT_SET_REQS,
> @@ -198,11 +186,9 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
>  		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
>  	},
>  	{
> -		.cmd		= NFSD_CMD_EXPKEY_GET_REQS,
> -		.dumpit		= nfsd_nl_expkey_get_reqs_dumpit,
> -		.policy		= nfsd_expkey_get_reqs_nl_policy,
> -		.maxattr	= NFSD_A_EXPKEY_REQS_REQUESTS,
> -		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
> +		.cmd	= NFSD_CMD_EXPKEY_GET_REQS,
> +		.dumpit	= nfsd_nl_expkey_get_reqs_dumpit,
> +		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>  	},
>  	{
>  		.cmd		= NFSD_CMD_EXPKEY_SET_REQS,
> diff --git a/net/sunrpc/netlink.c b/net/sunrpc/netlink.c
> index 5ccf0967809c..ce09ecc0faa2 100644
> --- a/net/sunrpc/netlink.c
> +++ b/net/sunrpc/netlink.c
> @@ -29,21 +29,11 @@ const struct nla_policy sunrpc_unix_gid_nl_policy[SUNRPC_A_UNIX_GID_EXPIRY + 1]
>  	[SUNRPC_A_UNIX_GID_EXPIRY] = { .type = NLA_U64, },
>  };
>  
> -/* SUNRPC_CMD_IP_MAP_GET_REQS - dump */
> -static const struct nla_policy sunrpc_ip_map_get_reqs_nl_policy[SUNRPC_A_IP_MAP_REQS_REQUESTS + 1] = {
> -	[SUNRPC_A_IP_MAP_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_ip_map_nl_policy),
> -};
> -
>  /* SUNRPC_CMD_IP_MAP_SET_REQS - do */
>  static const struct nla_policy sunrpc_ip_map_set_reqs_nl_policy[SUNRPC_A_IP_MAP_REQS_REQUESTS + 1] = {
>  	[SUNRPC_A_IP_MAP_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_ip_map_nl_policy),
>  };
>  
> -/* SUNRPC_CMD_UNIX_GID_GET_REQS - dump */
> -static const struct nla_policy sunrpc_unix_gid_get_reqs_nl_policy[SUNRPC_A_UNIX_GID_REQS_REQUESTS + 1] = {
> -	[SUNRPC_A_UNIX_GID_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_unix_gid_nl_policy),
> -};
> -
>  /* SUNRPC_CMD_UNIX_GID_SET_REQS - do */
>  static const struct nla_policy sunrpc_unix_gid_set_reqs_nl_policy[SUNRPC_A_UNIX_GID_REQS_REQUESTS + 1] = {
>  	[SUNRPC_A_UNIX_GID_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_unix_gid_nl_policy),
> @@ -57,11 +47,9 @@ static const struct nla_policy sunrpc_cache_flush_nl_policy[SUNRPC_A_CACHE_FLUSH
>  /* Ops table for sunrpc */
>  static const struct genl_split_ops sunrpc_nl_ops[] = {
>  	{
> -		.cmd		= SUNRPC_CMD_IP_MAP_GET_REQS,
> -		.dumpit		= sunrpc_nl_ip_map_get_reqs_dumpit,
> -		.policy		= sunrpc_ip_map_get_reqs_nl_policy,
> -		.maxattr	= SUNRPC_A_IP_MAP_REQS_REQUESTS,
> -		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
> +		.cmd	= SUNRPC_CMD_IP_MAP_GET_REQS,
> +		.dumpit	= sunrpc_nl_ip_map_get_reqs_dumpit,
> +		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>  	},
>  	{
>  		.cmd		= SUNRPC_CMD_IP_MAP_SET_REQS,
> @@ -71,11 +59,9 @@ static const struct genl_split_ops sunrpc_nl_ops[] = {
>  		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
>  	},
>  	{
> -		.cmd		= SUNRPC_CMD_UNIX_GID_GET_REQS,
> -		.dumpit		= sunrpc_nl_unix_gid_get_reqs_dumpit,
> -		.policy		= sunrpc_unix_gid_get_reqs_nl_policy,
> -		.maxattr	= SUNRPC_A_UNIX_GID_REQS_REQUESTS,
> -		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
> +		.cmd	= SUNRPC_CMD_UNIX_GID_GET_REQS,
> +		.dumpit	= sunrpc_nl_unix_gid_get_reqs_dumpit,
> +		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>  	},
>  	{
>  		.cmd		= SUNRPC_CMD_UNIX_GID_SET_REQS,


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

* Re: [PATCH] NFSD: Put cache get-reqs dump attrs under reply
  2026-04-23 17:24 ` Thorsten Leemhuis
@ 2026-04-23 17:26   ` Chuck Lever
  2026-04-23 17:50     ` Jeff Layton
  0 siblings, 1 reply; 8+ messages in thread
From: Chuck Lever @ 2026-04-23 17:26 UTC (permalink / raw)
  To: Thorsten Leemhuis, NeilBrown, Jeff Layton, Olga Kornievskaia,
	Dai Ngo, Tom Talpey
  Cc: linux-nfs, Chuck Lever

On 4/23/26 10:24 AM, Thorsten Leemhuis wrote:
> On 4/23/26 19:17, Chuck Lever wrote:
>> From: Chuck Lever <chuck.lever@oracle.com>
>>
>> The new get-reqs dump operations added to sunrpc_cache.yaml and
>> nfsd.yaml place the "requests" nested attribute under dump.request.
>> A netlink dump carries an empty request; its payload travels back
>> in the reply. Because the spec names no reply attributes, the YNL
>> C code generator synthesizes a forward reference to a
>> <op>_rsp struct that is never defined, breaking any consumer of
>> these specs.
>>
>> This first surfaced when Thorsten Leemhuis built tools/net/ynl
>> against -next:
> 
> Thx for the quick fix, this makes things work. In case anybody cares:
> 
> Tested-by: Thorsten Leemhuis <linux@leemhuis.info>

Thanks! Applied to nfsd-next.



-- 
Chuck Lever

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

* Re: [PATCH] NFSD: Put cache get-reqs dump attrs under reply
  2026-04-23 17:26   ` Chuck Lever
@ 2026-04-23 17:50     ` Jeff Layton
  2026-04-23 17:57       ` Chuck Lever
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Layton @ 2026-04-23 17:50 UTC (permalink / raw)
  To: Chuck Lever, Thorsten Leemhuis, NeilBrown, Olga Kornievskaia,
	Dai Ngo, Tom Talpey
  Cc: linux-nfs, Chuck Lever

On Thu, 2026-04-23 at 13:26 -0400, Chuck Lever wrote:
> On 4/23/26 10:24 AM, Thorsten Leemhuis wrote:
> > On 4/23/26 19:17, Chuck Lever wrote:
> > > From: Chuck Lever <chuck.lever@oracle.com>
> > > 
> > > The new get-reqs dump operations added to sunrpc_cache.yaml and
> > > nfsd.yaml place the "requests" nested attribute under dump.request.
> > > A netlink dump carries an empty request; its payload travels back
> > > in the reply. Because the spec names no reply attributes, the YNL
> > > C code generator synthesizes a forward reference to a
> > > <op>_rsp struct that is never defined, breaking any consumer of
> > > these specs.
> > > 
> > > This first surfaced when Thorsten Leemhuis built tools/net/ynl
> > > against -next:
> > 
> > Thx for the quick fix, this makes things work. In case anybody cares:
> > 
> > Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
> 
> Thanks! Applied to nfsd-next.
> 
> 

Many thanks! I was just sitting down to look at Thorsten's mail.
-- 
Jeff Layton <jlayton@kernel.org>

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

* Re: [PATCH] NFSD: Put cache get-reqs dump attrs under reply
  2026-04-23 17:50     ` Jeff Layton
@ 2026-04-23 17:57       ` Chuck Lever
  0 siblings, 0 replies; 8+ messages in thread
From: Chuck Lever @ 2026-04-23 17:57 UTC (permalink / raw)
  To: Jeff Layton, Thorsten Leemhuis, NeilBrown, Olga Kornievskaia,
	Dai Ngo, Tom Talpey
  Cc: linux-nfs, Chuck Lever

On 4/23/26 10:50 AM, Jeff Layton wrote:
> On Thu, 2026-04-23 at 13:26 -0400, Chuck Lever wrote:
>> On 4/23/26 10:24 AM, Thorsten Leemhuis wrote:
>>> On 4/23/26 19:17, Chuck Lever wrote:
>>>> From: Chuck Lever <chuck.lever@oracle.com>
>>>>
>>>> The new get-reqs dump operations added to sunrpc_cache.yaml and
>>>> nfsd.yaml place the "requests" nested attribute under dump.request.
>>>> A netlink dump carries an empty request; its payload travels back
>>>> in the reply. Because the spec names no reply attributes, the YNL
>>>> C code generator synthesizes a forward reference to a
>>>> <op>_rsp struct that is never defined, breaking any consumer of
>>>> these specs.
>>>>
>>>> This first surfaced when Thorsten Leemhuis built tools/net/ynl
>>>> against -next:
>>>
>>> Thx for the quick fix, this makes things work. In case anybody cares:
>>>
>>> Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
>>
>> Thanks! Applied to nfsd-next.
>>
>>
> 
> Many thanks! I was just sitting down to look at Thorsten's mail.

'Twas my own damn fault: it was a merge-resolution-gone-wrong.


-- 
Chuck Lever

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

* [PATCH] NFSD: Put cache get-reqs dump attrs under reply
  2026-04-23 18:15 [PATCH 0/4] cleanup block-style layouts exports v3 Chuck Lever
@ 2026-04-23 18:15 ` Chuck Lever
  2026-04-23 18:16   ` Chuck Lever
  2026-04-23 18:18   ` Jeff Layton
  0 siblings, 2 replies; 8+ messages in thread
From: Chuck Lever @ 2026-04-23 18:15 UTC (permalink / raw)
  To: Christian Brauner
  Cc: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey,
	linux-nfs, Chuck Lever, Thorsten Leemhuis

From: Chuck Lever <chuck.lever@oracle.com>

The new get-reqs dump operations added to sunrpc_cache.yaml and
nfsd.yaml place the "requests" nested attribute under dump.request.
A netlink dump carries an empty request; its payload travels back
in the reply. Because the spec names no reply attributes, the YNL
C code generator synthesizes a forward reference to a
<op>_rsp struct that is never defined, breaking any consumer of
these specs.

This first surfaced when Thorsten Leemhuis built tools/net/ynl
against -next:

  nfsd-user.h:746: error: field 'obj' has incomplete type
    struct nfsd_svc_export_get_reqs_rsp obj ...
  nfsd-user.h:826: error: field 'obj' has incomplete type
    struct nfsd_expkey_get_reqs_rsp obj ...
  nfsd-user.c:1211: error: 'nfsd_svc_export_get_reqs_rsp_parse'
    undeclared

sunrpc_cache.yaml has the same defect in ip-map-get-reqs and
unix-gid-get-reqs, but nfsd.yaml errors out first in the Makefile's
alphabetical build order and hides the sunrpc failures.

These bugs were introduced by incorrect merge conflict resolution.

Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
Closes: https://lore.kernel.org/linux-nfs/f6a3ca6d-e5cb-4a5c-9af2-8d2b1ce33ef0@leemhuis.info/
Fixes: 1045ccf519ce30 ("sunrpc: add netlink upcall for the auth.unix.ip cache")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 Documentation/netlink/specs/nfsd.yaml         |  4 +--
 Documentation/netlink/specs/sunrpc_cache.yaml |  4 +--
 fs/nfsd/netlink.c                             | 26 +++++--------------
 net/sunrpc/netlink.c                          | 26 +++++--------------
 4 files changed, 16 insertions(+), 44 deletions(-)

diff --git a/Documentation/netlink/specs/nfsd.yaml b/Documentation/netlink/specs/nfsd.yaml
index 17e714ef683d..8f36fadd68f7 100644
--- a/Documentation/netlink/specs/nfsd.yaml
+++ b/Documentation/netlink/specs/nfsd.yaml
@@ -445,7 +445,7 @@ operations:
       attribute-set: svc-export-reqs
       flags: [admin-perm]
       dump:
-          request:
+          reply:
             attributes:
               - requests
     -
@@ -463,7 +463,7 @@ operations:
       attribute-set: expkey-reqs
       flags: [admin-perm]
       dump:
-          request:
+          reply:
             attributes:
               - requests
     -
diff --git a/Documentation/netlink/specs/sunrpc_cache.yaml b/Documentation/netlink/specs/sunrpc_cache.yaml
index 55dabc914dbc..f22ff22b9418 100644
--- a/Documentation/netlink/specs/sunrpc_cache.yaml
+++ b/Documentation/netlink/specs/sunrpc_cache.yaml
@@ -101,7 +101,7 @@ operations:
       attribute-set: ip-map-reqs
       flags: [admin-perm]
       dump:
-          request:
+          reply:
             attributes:
               - requests
     -
@@ -119,7 +119,7 @@ operations:
       attribute-set: unix-gid-reqs
       flags: [admin-perm]
       dump:
-          request:
+          reply:
             attributes:
               - requests
     -
diff --git a/fs/nfsd/netlink.c b/fs/nfsd/netlink.c
index df5b0e2fb286..fbee3676d253 100644
--- a/fs/nfsd/netlink.c
+++ b/fs/nfsd/netlink.c
@@ -88,21 +88,11 @@ static const struct nla_policy nfsd_pool_mode_set_nl_policy[NFSD_A_POOL_MODE_MOD
 	[NFSD_A_POOL_MODE_MODE] = { .type = NLA_NUL_STRING, },
 };
 
-/* NFSD_CMD_SVC_EXPORT_GET_REQS - dump */
-static const struct nla_policy nfsd_svc_export_get_reqs_nl_policy[NFSD_A_SVC_EXPORT_REQS_REQUESTS + 1] = {
-	[NFSD_A_SVC_EXPORT_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_svc_export_nl_policy),
-};
-
 /* NFSD_CMD_SVC_EXPORT_SET_REQS - do */
 static const struct nla_policy nfsd_svc_export_set_reqs_nl_policy[NFSD_A_SVC_EXPORT_REQS_REQUESTS + 1] = {
 	[NFSD_A_SVC_EXPORT_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_svc_export_nl_policy),
 };
 
-/* NFSD_CMD_EXPKEY_GET_REQS - dump */
-static const struct nla_policy nfsd_expkey_get_reqs_nl_policy[NFSD_A_EXPKEY_REQS_REQUESTS + 1] = {
-	[NFSD_A_EXPKEY_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_expkey_nl_policy),
-};
-
 /* NFSD_CMD_EXPKEY_SET_REQS - do */
 static const struct nla_policy nfsd_expkey_set_reqs_nl_policy[NFSD_A_EXPKEY_REQS_REQUESTS + 1] = {
 	[NFSD_A_EXPKEY_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_expkey_nl_policy),
@@ -184,11 +174,9 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
 		.flags	= GENL_CMD_CAP_DO,
 	},
 	{
-		.cmd		= NFSD_CMD_SVC_EXPORT_GET_REQS,
-		.dumpit		= nfsd_nl_svc_export_get_reqs_dumpit,
-		.policy		= nfsd_svc_export_get_reqs_nl_policy,
-		.maxattr	= NFSD_A_SVC_EXPORT_REQS_REQUESTS,
-		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+		.cmd	= NFSD_CMD_SVC_EXPORT_GET_REQS,
+		.dumpit	= nfsd_nl_svc_export_get_reqs_dumpit,
+		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	},
 	{
 		.cmd		= NFSD_CMD_SVC_EXPORT_SET_REQS,
@@ -198,11 +186,9 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
 		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
 	},
 	{
-		.cmd		= NFSD_CMD_EXPKEY_GET_REQS,
-		.dumpit		= nfsd_nl_expkey_get_reqs_dumpit,
-		.policy		= nfsd_expkey_get_reqs_nl_policy,
-		.maxattr	= NFSD_A_EXPKEY_REQS_REQUESTS,
-		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+		.cmd	= NFSD_CMD_EXPKEY_GET_REQS,
+		.dumpit	= nfsd_nl_expkey_get_reqs_dumpit,
+		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	},
 	{
 		.cmd		= NFSD_CMD_EXPKEY_SET_REQS,
diff --git a/net/sunrpc/netlink.c b/net/sunrpc/netlink.c
index 5ccf0967809c..ce09ecc0faa2 100644
--- a/net/sunrpc/netlink.c
+++ b/net/sunrpc/netlink.c
@@ -29,21 +29,11 @@ const struct nla_policy sunrpc_unix_gid_nl_policy[SUNRPC_A_UNIX_GID_EXPIRY + 1]
 	[SUNRPC_A_UNIX_GID_EXPIRY] = { .type = NLA_U64, },
 };
 
-/* SUNRPC_CMD_IP_MAP_GET_REQS - dump */
-static const struct nla_policy sunrpc_ip_map_get_reqs_nl_policy[SUNRPC_A_IP_MAP_REQS_REQUESTS + 1] = {
-	[SUNRPC_A_IP_MAP_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_ip_map_nl_policy),
-};
-
 /* SUNRPC_CMD_IP_MAP_SET_REQS - do */
 static const struct nla_policy sunrpc_ip_map_set_reqs_nl_policy[SUNRPC_A_IP_MAP_REQS_REQUESTS + 1] = {
 	[SUNRPC_A_IP_MAP_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_ip_map_nl_policy),
 };
 
-/* SUNRPC_CMD_UNIX_GID_GET_REQS - dump */
-static const struct nla_policy sunrpc_unix_gid_get_reqs_nl_policy[SUNRPC_A_UNIX_GID_REQS_REQUESTS + 1] = {
-	[SUNRPC_A_UNIX_GID_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_unix_gid_nl_policy),
-};
-
 /* SUNRPC_CMD_UNIX_GID_SET_REQS - do */
 static const struct nla_policy sunrpc_unix_gid_set_reqs_nl_policy[SUNRPC_A_UNIX_GID_REQS_REQUESTS + 1] = {
 	[SUNRPC_A_UNIX_GID_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_unix_gid_nl_policy),
@@ -57,11 +47,9 @@ static const struct nla_policy sunrpc_cache_flush_nl_policy[SUNRPC_A_CACHE_FLUSH
 /* Ops table for sunrpc */
 static const struct genl_split_ops sunrpc_nl_ops[] = {
 	{
-		.cmd		= SUNRPC_CMD_IP_MAP_GET_REQS,
-		.dumpit		= sunrpc_nl_ip_map_get_reqs_dumpit,
-		.policy		= sunrpc_ip_map_get_reqs_nl_policy,
-		.maxattr	= SUNRPC_A_IP_MAP_REQS_REQUESTS,
-		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+		.cmd	= SUNRPC_CMD_IP_MAP_GET_REQS,
+		.dumpit	= sunrpc_nl_ip_map_get_reqs_dumpit,
+		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	},
 	{
 		.cmd		= SUNRPC_CMD_IP_MAP_SET_REQS,
@@ -71,11 +59,9 @@ static const struct genl_split_ops sunrpc_nl_ops[] = {
 		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
 	},
 	{
-		.cmd		= SUNRPC_CMD_UNIX_GID_GET_REQS,
-		.dumpit		= sunrpc_nl_unix_gid_get_reqs_dumpit,
-		.policy		= sunrpc_unix_gid_get_reqs_nl_policy,
-		.maxattr	= SUNRPC_A_UNIX_GID_REQS_REQUESTS,
-		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+		.cmd	= SUNRPC_CMD_UNIX_GID_GET_REQS,
+		.dumpit	= sunrpc_nl_unix_gid_get_reqs_dumpit,
+		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	},
 	{
 		.cmd		= SUNRPC_CMD_UNIX_GID_SET_REQS,
-- 
2.53.0


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

* Re: [PATCH] NFSD: Put cache get-reqs dump attrs under reply
  2026-04-23 18:15 ` [PATCH] NFSD: Put cache get-reqs dump attrs under reply Chuck Lever
@ 2026-04-23 18:16   ` Chuck Lever
  2026-04-23 18:18   ` Jeff Layton
  1 sibling, 0 replies; 8+ messages in thread
From: Chuck Lever @ 2026-04-23 18:16 UTC (permalink / raw)
  To: Chuck Lever, Christian Brauner
  Cc: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey,
	linux-nfs, Thorsten Leemhuis

On 4/23/26 11:15 AM, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>

Damn it. Ignore this, I will try again.

-- 
Chuck Lever

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

* Re: [PATCH] NFSD: Put cache get-reqs dump attrs under reply
  2026-04-23 18:15 ` [PATCH] NFSD: Put cache get-reqs dump attrs under reply Chuck Lever
  2026-04-23 18:16   ` Chuck Lever
@ 2026-04-23 18:18   ` Jeff Layton
  1 sibling, 0 replies; 8+ messages in thread
From: Jeff Layton @ 2026-04-23 18:18 UTC (permalink / raw)
  To: Chuck Lever, Christian Brauner
  Cc: NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey, linux-nfs,
	Chuck Lever, Thorsten Leemhuis

On Thu, 2026-04-23 at 14:15 -0400, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> The new get-reqs dump operations added to sunrpc_cache.yaml and
> nfsd.yaml place the "requests" nested attribute under dump.request.
> A netlink dump carries an empty request; its payload travels back
> in the reply. Because the spec names no reply attributes, the YNL
> C code generator synthesizes a forward reference to a
> <op>_rsp struct that is never defined, breaking any consumer of
> these specs.
> 
> This first surfaced when Thorsten Leemhuis built tools/net/ynl
> against -next:
> 
>   nfsd-user.h:746: error: field 'obj' has incomplete type
>     struct nfsd_svc_export_get_reqs_rsp obj ...
>   nfsd-user.h:826: error: field 'obj' has incomplete type
>     struct nfsd_expkey_get_reqs_rsp obj ...
>   nfsd-user.c:1211: error: 'nfsd_svc_export_get_reqs_rsp_parse'
>     undeclared
> 
> sunrpc_cache.yaml has the same defect in ip-map-get-reqs and
> unix-gid-get-reqs, but nfsd.yaml errors out first in the Makefile's
> alphabetical build order and hides the sunrpc failures.
> 
> These bugs were introduced by incorrect merge conflict resolution.
> 
> Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
> Closes: https://lore.kernel.org/linux-nfs/f6a3ca6d-e5cb-4a5c-9af2-8d2b1ce33ef0@leemhuis.info/
> Fixes: 1045ccf519ce30 ("sunrpc: add netlink upcall for the auth.unix.ip cache")
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  Documentation/netlink/specs/nfsd.yaml         |  4 +--
>  Documentation/netlink/specs/sunrpc_cache.yaml |  4 +--
>  fs/nfsd/netlink.c                             | 26 +++++--------------
>  net/sunrpc/netlink.c                          | 26 +++++--------------
>  4 files changed, 16 insertions(+), 44 deletions(-)
> 
> diff --git a/Documentation/netlink/specs/nfsd.yaml b/Documentation/netlink/specs/nfsd.yaml
> index 17e714ef683d..8f36fadd68f7 100644
> --- a/Documentation/netlink/specs/nfsd.yaml
> +++ b/Documentation/netlink/specs/nfsd.yaml
> @@ -445,7 +445,7 @@ operations:
>        attribute-set: svc-export-reqs
>        flags: [admin-perm]
>        dump:
> -          request:
> +          reply:
>              attributes:
>                - requests
>      -
> @@ -463,7 +463,7 @@ operations:
>        attribute-set: expkey-reqs
>        flags: [admin-perm]
>        dump:
> -          request:
> +          reply:
>              attributes:
>                - requests
>      -
> diff --git a/Documentation/netlink/specs/sunrpc_cache.yaml b/Documentation/netlink/specs/sunrpc_cache.yaml
> index 55dabc914dbc..f22ff22b9418 100644
> --- a/Documentation/netlink/specs/sunrpc_cache.yaml
> +++ b/Documentation/netlink/specs/sunrpc_cache.yaml
> @@ -101,7 +101,7 @@ operations:
>        attribute-set: ip-map-reqs
>        flags: [admin-perm]
>        dump:
> -          request:
> +          reply:
>              attributes:
>                - requests
>      -
> @@ -119,7 +119,7 @@ operations:
>        attribute-set: unix-gid-reqs
>        flags: [admin-perm]
>        dump:
> -          request:
> +          reply:
>              attributes:
>                - requests
>      -
> diff --git a/fs/nfsd/netlink.c b/fs/nfsd/netlink.c
> index df5b0e2fb286..fbee3676d253 100644
> --- a/fs/nfsd/netlink.c
> +++ b/fs/nfsd/netlink.c
> @@ -88,21 +88,11 @@ static const struct nla_policy nfsd_pool_mode_set_nl_policy[NFSD_A_POOL_MODE_MOD
>  	[NFSD_A_POOL_MODE_MODE] = { .type = NLA_NUL_STRING, },
>  };
>  
> -/* NFSD_CMD_SVC_EXPORT_GET_REQS - dump */
> -static const struct nla_policy nfsd_svc_export_get_reqs_nl_policy[NFSD_A_SVC_EXPORT_REQS_REQUESTS + 1] = {
> -	[NFSD_A_SVC_EXPORT_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_svc_export_nl_policy),
> -};
> -
>  /* NFSD_CMD_SVC_EXPORT_SET_REQS - do */
>  static const struct nla_policy nfsd_svc_export_set_reqs_nl_policy[NFSD_A_SVC_EXPORT_REQS_REQUESTS + 1] = {
>  	[NFSD_A_SVC_EXPORT_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_svc_export_nl_policy),
>  };
>  
> -/* NFSD_CMD_EXPKEY_GET_REQS - dump */
> -static const struct nla_policy nfsd_expkey_get_reqs_nl_policy[NFSD_A_EXPKEY_REQS_REQUESTS + 1] = {
> -	[NFSD_A_EXPKEY_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_expkey_nl_policy),
> -};
> -
>  /* NFSD_CMD_EXPKEY_SET_REQS - do */
>  static const struct nla_policy nfsd_expkey_set_reqs_nl_policy[NFSD_A_EXPKEY_REQS_REQUESTS + 1] = {
>  	[NFSD_A_EXPKEY_REQS_REQUESTS] = NLA_POLICY_NESTED(nfsd_expkey_nl_policy),
> @@ -184,11 +174,9 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
>  		.flags	= GENL_CMD_CAP_DO,
>  	},
>  	{
> -		.cmd		= NFSD_CMD_SVC_EXPORT_GET_REQS,
> -		.dumpit		= nfsd_nl_svc_export_get_reqs_dumpit,
> -		.policy		= nfsd_svc_export_get_reqs_nl_policy,
> -		.maxattr	= NFSD_A_SVC_EXPORT_REQS_REQUESTS,
> -		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
> +		.cmd	= NFSD_CMD_SVC_EXPORT_GET_REQS,
> +		.dumpit	= nfsd_nl_svc_export_get_reqs_dumpit,
> +		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>  	},
>  	{
>  		.cmd		= NFSD_CMD_SVC_EXPORT_SET_REQS,
> @@ -198,11 +186,9 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
>  		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
>  	},
>  	{
> -		.cmd		= NFSD_CMD_EXPKEY_GET_REQS,
> -		.dumpit		= nfsd_nl_expkey_get_reqs_dumpit,
> -		.policy		= nfsd_expkey_get_reqs_nl_policy,
> -		.maxattr	= NFSD_A_EXPKEY_REQS_REQUESTS,
> -		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
> +		.cmd	= NFSD_CMD_EXPKEY_GET_REQS,
> +		.dumpit	= nfsd_nl_expkey_get_reqs_dumpit,
> +		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>  	},
>  	{
>  		.cmd		= NFSD_CMD_EXPKEY_SET_REQS,
> diff --git a/net/sunrpc/netlink.c b/net/sunrpc/netlink.c
> index 5ccf0967809c..ce09ecc0faa2 100644
> --- a/net/sunrpc/netlink.c
> +++ b/net/sunrpc/netlink.c
> @@ -29,21 +29,11 @@ const struct nla_policy sunrpc_unix_gid_nl_policy[SUNRPC_A_UNIX_GID_EXPIRY + 1]
>  	[SUNRPC_A_UNIX_GID_EXPIRY] = { .type = NLA_U64, },
>  };
>  
> -/* SUNRPC_CMD_IP_MAP_GET_REQS - dump */
> -static const struct nla_policy sunrpc_ip_map_get_reqs_nl_policy[SUNRPC_A_IP_MAP_REQS_REQUESTS + 1] = {
> -	[SUNRPC_A_IP_MAP_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_ip_map_nl_policy),
> -};
> -
>  /* SUNRPC_CMD_IP_MAP_SET_REQS - do */
>  static const struct nla_policy sunrpc_ip_map_set_reqs_nl_policy[SUNRPC_A_IP_MAP_REQS_REQUESTS + 1] = {
>  	[SUNRPC_A_IP_MAP_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_ip_map_nl_policy),
>  };
>  
> -/* SUNRPC_CMD_UNIX_GID_GET_REQS - dump */
> -static const struct nla_policy sunrpc_unix_gid_get_reqs_nl_policy[SUNRPC_A_UNIX_GID_REQS_REQUESTS + 1] = {
> -	[SUNRPC_A_UNIX_GID_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_unix_gid_nl_policy),
> -};
> -
>  /* SUNRPC_CMD_UNIX_GID_SET_REQS - do */
>  static const struct nla_policy sunrpc_unix_gid_set_reqs_nl_policy[SUNRPC_A_UNIX_GID_REQS_REQUESTS + 1] = {
>  	[SUNRPC_A_UNIX_GID_REQS_REQUESTS] = NLA_POLICY_NESTED(sunrpc_unix_gid_nl_policy),
> @@ -57,11 +47,9 @@ static const struct nla_policy sunrpc_cache_flush_nl_policy[SUNRPC_A_CACHE_FLUSH
>  /* Ops table for sunrpc */
>  static const struct genl_split_ops sunrpc_nl_ops[] = {
>  	{
> -		.cmd		= SUNRPC_CMD_IP_MAP_GET_REQS,
> -		.dumpit		= sunrpc_nl_ip_map_get_reqs_dumpit,
> -		.policy		= sunrpc_ip_map_get_reqs_nl_policy,
> -		.maxattr	= SUNRPC_A_IP_MAP_REQS_REQUESTS,
> -		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
> +		.cmd	= SUNRPC_CMD_IP_MAP_GET_REQS,
> +		.dumpit	= sunrpc_nl_ip_map_get_reqs_dumpit,
> +		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>  	},
>  	{
>  		.cmd		= SUNRPC_CMD_IP_MAP_SET_REQS,
> @@ -71,11 +59,9 @@ static const struct genl_split_ops sunrpc_nl_ops[] = {
>  		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
>  	},
>  	{
> -		.cmd		= SUNRPC_CMD_UNIX_GID_GET_REQS,
> -		.dumpit		= sunrpc_nl_unix_gid_get_reqs_dumpit,
> -		.policy		= sunrpc_unix_gid_get_reqs_nl_policy,
> -		.maxattr	= SUNRPC_A_UNIX_GID_REQS_REQUESTS,
> -		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
> +		.cmd	= SUNRPC_CMD_UNIX_GID_GET_REQS,
> +		.dumpit	= sunrpc_nl_unix_gid_get_reqs_dumpit,
> +		.flags	= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>  	},
>  	{
>  		.cmd		= SUNRPC_CMD_UNIX_GID_SET_REQS,

Reviewed-by: Jeff Layton <jlayton@kernel.org>

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

end of thread, other threads:[~2026-04-23 18:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 17:17 [PATCH] NFSD: Put cache get-reqs dump attrs under reply Chuck Lever
2026-04-23 17:24 ` Thorsten Leemhuis
2026-04-23 17:26   ` Chuck Lever
2026-04-23 17:50     ` Jeff Layton
2026-04-23 17:57       ` Chuck Lever
  -- strict thread matches above, loose matches on Subject: below --
2026-04-23 18:15 [PATCH 0/4] cleanup block-style layouts exports v3 Chuck Lever
2026-04-23 18:15 ` [PATCH] NFSD: Put cache get-reqs dump attrs under reply Chuck Lever
2026-04-23 18:16   ` Chuck Lever
2026-04-23 18:18   ` Jeff Layton

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