Commit 910043a7 authored by Wang Hai's avatar Wang Hai Committed by Zhengchao Shao
Browse files

kabi: net: reserve space for net sunrpc subsystem related structure

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: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 2b20083c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
+12 −0
Original line number Diff line number Diff line
@@ -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 {
+15 −0
Original line number Diff line number Diff line
@@ -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)
};

/*
+7 −0
Original line number Diff line number Diff line
@@ -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;
+17 −0
Original line number Diff line number Diff line
@@ -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 {