summaryrefslogtreecommitdiff
path: root/fs/nfsd/netlink.h
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2024-04-23 15:25:41 +0200
committerChuck Lever <chuck.lever@oracle.com>2024-05-06 09:07:21 -0400
commit5a939bea25be9793d9aa5d8494df667dfe625e6b (patch)
tree7acecf776e1a58f098a7d1fed79345845f7896f8 /fs/nfsd/netlink.h
parent924f4fb003ba114c60b3c07a011dcd86a8956cd1 (diff)
downloadlwn-5a939bea25be9793d9aa5d8494df667dfe625e6b.tar.gz
lwn-5a939bea25be9793d9aa5d8494df667dfe625e6b.zip
NFSD: add write_version to netlink command
Introduce write_version netlink command through a "declarative" interface. This patch introduces a change in behavior since for version-set userspace is expected to provide a NFS major/minor version list it wants to enable while all the other ones will be disabled. (procfs write_version command implements imperative interface where the admin writes +3/-3 to enable/disable a single version. Reviewed-by: Jeff Layton <jlayton@kernel.org> Tested-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/netlink.h')
-rw-r--r--fs/nfsd/netlink.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfsd/netlink.h b/fs/nfsd/netlink.h
index 4137fac477e4..c7c0da275481 100644
--- a/fs/nfsd/netlink.h
+++ b/fs/nfsd/netlink.h
@@ -11,6 +11,9 @@
#include <uapi/linux/nfsd_netlink.h>
+/* Common nested types */
+extern const struct nla_policy nfsd_version_nl_policy[NFSD_A_VERSION_ENABLED + 1];
+
int nfsd_nl_rpc_status_get_start(struct netlink_callback *cb);
int nfsd_nl_rpc_status_get_done(struct netlink_callback *cb);
@@ -18,6 +21,8 @@ int nfsd_nl_rpc_status_get_dumpit(struct sk_buff *skb,
struct netlink_callback *cb);
int nfsd_nl_threads_set_doit(struct sk_buff *skb, struct genl_info *info);
int nfsd_nl_threads_get_doit(struct sk_buff *skb, struct genl_info *info);
+int nfsd_nl_version_set_doit(struct sk_buff *skb, struct genl_info *info);
+int nfsd_nl_version_get_doit(struct sk_buff *skb, struct genl_info *info);
extern struct genl_family nfsd_nl_family;