Commit 5aae4a9a authored by Benny Halevy's avatar Benny Halevy

nfs41: Use mount minorversion option

Use the mount minorversion option to initialize the nfs_client cl_minorversion
and match it in nfs_match_client() when looking up a nfs_client.

[nfs41: remove ifdefs around nfs_client_initdata.minorversion]
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 94a417f3
...@@ -102,6 +102,7 @@ struct nfs_client_initdata { ...@@ -102,6 +102,7 @@ struct nfs_client_initdata {
size_t addrlen; size_t addrlen;
const struct nfs_rpc_ops *rpc_ops; const struct nfs_rpc_ops *rpc_ops;
int proto; int proto;
u32 minorversion;
}; };
/* /*
...@@ -150,6 +151,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ ...@@ -150,6 +151,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_
rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS client"); rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS client");
clp->cl_boot_time = CURRENT_TIME; clp->cl_boot_time = CURRENT_TIME;
clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED; clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED;
clp->cl_minorversion = cl_init->minorversion;
#endif #endif
cred = rpc_lookup_machine_cred(); cred = rpc_lookup_machine_cred();
if (!IS_ERR(cred)) if (!IS_ERR(cred))
...@@ -420,7 +422,9 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat ...@@ -420,7 +422,9 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat
if (clp->cl_proto != data->proto) if (clp->cl_proto != data->proto)
continue; continue;
/* Match nfsv4 minorversion */
if (clp->cl_minorversion != data->minorversion)
continue;
/* Match the full socket address */ /* Match the full socket address */
if (!nfs_sockaddr_cmp(sap, clap)) if (!nfs_sockaddr_cmp(sap, clap))
continue; continue;
...@@ -1110,6 +1114,7 @@ static int nfs4_set_client(struct nfs_server *server, ...@@ -1110,6 +1114,7 @@ static int nfs4_set_client(struct nfs_server *server,
.addrlen = addrlen, .addrlen = addrlen,
.rpc_ops = &nfs_v4_clientops, .rpc_ops = &nfs_v4_clientops,
.proto = proto, .proto = proto,
.minorversion = minorversion,
}; };
struct nfs_client *clp; struct nfs_client *clp;
int error; int error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment