diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 13:16:20 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 16:07:04 -0400 |
commit | 5ee0ed7d3ab620a764740fb018f469d45f561931 (patch) | |
tree | 9b6a938fe521815afd3cfb42e2023b443bb05d28 /include/linux/sunrpc/clnt.h | |
parent | 5b616f5d596c0b056129f8aeafbc08409b3cd050 (diff) |
[PATCH] RPC: Make rpc_create_client() probe server for RPC program+version support
Ensure that we don't create an RPC client without checking that the server
does indeed support the RPC program + version that we are trying to set up.
This enables us to immediately return an error to "mount" if it turns out
that the server is only supporting NFSv2, when we requested NFSv3 or NFSv4.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc/clnt.h')
-rw-r--r-- | include/linux/sunrpc/clnt.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 2709caf4d128..d25e80f77ff5 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -111,6 +111,9 @@ struct rpc_procinfo { | |||
111 | struct rpc_clnt *rpc_create_client(struct rpc_xprt *xprt, char *servname, | 111 | struct rpc_clnt *rpc_create_client(struct rpc_xprt *xprt, char *servname, |
112 | struct rpc_program *info, | 112 | struct rpc_program *info, |
113 | u32 version, rpc_authflavor_t authflavor); | 113 | u32 version, rpc_authflavor_t authflavor); |
114 | struct rpc_clnt *rpc_new_client(struct rpc_xprt *xprt, char *servname, | ||
115 | struct rpc_program *info, | ||
116 | u32 version, rpc_authflavor_t authflavor); | ||
114 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); | 117 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); |
115 | int rpc_shutdown_client(struct rpc_clnt *); | 118 | int rpc_shutdown_client(struct rpc_clnt *); |
116 | int rpc_destroy_client(struct rpc_clnt *); | 119 | int rpc_destroy_client(struct rpc_clnt *); |
@@ -129,6 +132,7 @@ void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); | |||
129 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); | 132 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); |
130 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | 133 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); |
131 | size_t rpc_max_payload(struct rpc_clnt *); | 134 | size_t rpc_max_payload(struct rpc_clnt *); |
135 | int rpc_ping(struct rpc_clnt *clnt, int flags); | ||
132 | 136 | ||
133 | static __inline__ | 137 | static __inline__ |
134 | int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags) | 138 | int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags) |