diff options
| author | Andy Adamson <andros@netapp.com> | 2016-09-09 09:22:26 -0400 |
|---|---|---|
| committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2016-09-19 13:08:36 -0400 |
| commit | fda0ab41170ee0a1c7a3781ff8cfb4395c3dd784 (patch) | |
| tree | dc7eeeee9c9731dc0aa0340028d7491aea5c4b26 /include/linux/sunrpc | |
| parent | 39e5d2df959dd4aea81fa33d765d2a5cc67a0512 (diff) | |
SUNRPC: rpc_clnt_add_xprt setup function for NFS layer
Use a setup function to call into the NFS layer to test an rpc_xprt
for session trunking so as to not leak the rpc_xprt_switch into
the nfs layer.
Search for the address in the rpc_xprt_switch first so as not to
put an unnecessary EXCHANGE_ID on the wire.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 35cc539e2921..85cc819676e8 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -125,6 +125,13 @@ struct rpc_create_args { | |||
| 125 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ | 125 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ |
| 126 | }; | 126 | }; |
| 127 | 127 | ||
| 128 | struct rpc_add_xprt_test { | ||
| 129 | int (*add_xprt_test)(struct rpc_clnt *, | ||
| 130 | struct rpc_xprt *, | ||
| 131 | void *calldata); | ||
| 132 | void *data; | ||
| 133 | }; | ||
| 134 | |||
| 128 | /* Values for "flags" field */ | 135 | /* Values for "flags" field */ |
| 129 | #define RPC_CLNT_CREATE_HARDRTRY (1UL << 0) | 136 | #define RPC_CLNT_CREATE_HARDRTRY (1UL << 0) |
| 130 | #define RPC_CLNT_CREATE_AUTOBIND (1UL << 2) | 137 | #define RPC_CLNT_CREATE_AUTOBIND (1UL << 2) |
| @@ -198,6 +205,11 @@ int rpc_clnt_add_xprt(struct rpc_clnt *, struct xprt_create *, | |||
| 198 | void rpc_cap_max_reconnect_timeout(struct rpc_clnt *clnt, | 205 | void rpc_cap_max_reconnect_timeout(struct rpc_clnt *clnt, |
| 199 | unsigned long timeo); | 206 | unsigned long timeo); |
| 200 | 207 | ||
| 208 | int rpc_clnt_setup_test_and_add_xprt(struct rpc_clnt *, | ||
| 209 | struct rpc_xprt_switch *, | ||
| 210 | struct rpc_xprt *, | ||
| 211 | void *); | ||
| 212 | |||
| 201 | const char *rpc_proc_name(const struct rpc_task *task); | 213 | const char *rpc_proc_name(const struct rpc_task *task); |
| 202 | 214 | ||
| 203 | void rpc_clnt_xprt_switch_put(struct rpc_clnt *); | 215 | void rpc_clnt_xprt_switch_put(struct rpc_clnt *); |
