From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC
----------------------------------------------------
Reserve some fields beforehand for net sunrpc framework related structures prone to change.
Signed-off-by: Wang Hai wanghai38@huawei.com Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/linux/sunrpc/cache.h | 4 ++++ include/linux/sunrpc/clnt.h | 12 ++++++++++++ include/linux/sunrpc/sched.h | 15 +++++++++++++++ include/linux/sunrpc/stats.h | 7 +++++++ include/linux/sunrpc/xprt.h | 17 +++++++++++++++++ 5 files changed, 55 insertions(+)
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 35766963dd14..3281bbb28eb2 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -16,6 +16,7 @@ #include <linux/atomic.h> #include <linux/kstrtox.h> #include <linux/proc_fs.h> +#include <linux/kabi.h>
/* * Each cache requires: @@ -123,6 +124,9 @@ struct cache_detail { struct dentry *pipefs; }; struct net *net; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* this must be embedded in any request structure that diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index e9d4377d03c6..3eddb3493de2 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -28,6 +28,7 @@ #include <linux/path.h> #include <net/ipv6.h> #include <linux/sunrpc/xprtmultipath.h> +#include <linux/kabi.h>
struct rpc_inode; struct rpc_sysfs_client { @@ -93,6 +94,11 @@ struct rpc_clnt { const struct cred *cl_cred; unsigned int cl_max_connect; /* max number of transports not to the same IP */ struct super_block *pipefs_sb; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* @@ -106,6 +112,9 @@ struct rpc_program { const struct rpc_version ** version; /* version array */ struct rpc_stat * stats; /* statistics */ const char * pipe_dir_name; /* path to rpc_pipefs dir */ + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rpc_version { @@ -151,6 +160,9 @@ struct rpc_create_args { struct xprtsec_parms xprtsec; unsigned long connect_timeout; unsigned long reconnect_timeout; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rpc_add_xprt_test { diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 8ada7dc802d3..b29453da8c85 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -17,6 +17,7 @@ #include <linux/wait_bit.h> #include <linux/workqueue.h> #include <linux/sunrpc/xdr.h> +#include <linux/kabi.h>
/* * This is the actual RPC procedure call info. @@ -27,6 +28,9 @@ struct rpc_message { void * rpc_argp; /* Arguments */ void * rpc_resp; /* Result */ const struct cred * rpc_cred; /* Credentials */ + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rpc_call_ops; @@ -91,6 +95,11 @@ struct rpc_task { unsigned char tk_priority : 2,/* Task priority */ tk_garb_retry : 2, tk_cred_retry : 2; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
typedef void (*rpc_action)(struct rpc_task *); @@ -100,6 +109,9 @@ struct rpc_call_ops { void (*rpc_call_done)(struct rpc_task *, void *); void (*rpc_count_stats)(struct rpc_task *, void *); void (*rpc_release)(void *); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rpc_task_setup { @@ -113,6 +125,9 @@ struct rpc_task_setup { struct workqueue_struct *workqueue; unsigned short flags; signed char priority; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index 3ce1550d1beb..e295b0f805cb 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h @@ -11,6 +11,7 @@ #define _LINUX_SUNRPC_STATS_H
#include <linux/proc_fs.h> +#include <linux/kabi.h>
struct rpc_stat { const struct rpc_program *program; @@ -24,6 +25,9 @@ struct rpc_stat { rpcretrans, rpcauthrefresh, rpcgarbage; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct svc_stat { @@ -37,6 +41,9 @@ struct svc_stat { rpcbadfmt, rpcbadauth, rpcbadclnt; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct net; diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 4ecc89301eb7..44ab7f2c38a4 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -18,6 +18,7 @@ #include <linux/sunrpc/sched.h> #include <linux/sunrpc/xdr.h> #include <linux/sunrpc/msg_prot.h> +#include <linux/kabi.h>
#define RPC_MIN_SLOT_TABLE (2U) #define RPC_DEF_SLOT_TABLE (16U) @@ -39,6 +40,9 @@ struct rpc_timeout { to_increment; /* if !exponential */ unsigned int to_retries; /* max # of retries */ unsigned char to_exponential; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
enum rpc_display_format_t { @@ -125,6 +129,11 @@ struct rpc_rqst { unsigned long rq_bc_pa_state; /* Backchannel prealloc state */ struct list_head rq_bc_pa_list; /* Backchannel prealloc list */ #endif /* CONFIG_SUNRPC_BACKCHANEL */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; #define rq_svec rq_snd_buf.head #define rq_slen rq_snd_buf.len @@ -315,6 +324,11 @@ struct rpc_xprt { const struct xprt_class *xprt_class; struct rpc_sysfs_xprt *xprt_sysfs; bool main; /*mark if this is the 1st transport */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#if defined(CONFIG_SUNRPC_BACKCHANNEL) @@ -353,6 +367,9 @@ struct xprt_create { struct xprtsec_parms xprtsec; unsigned long connect_timeout; unsigned long reconnect_timeout; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct xprt_class {