aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-04-01 09:21:50 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 13:46:17 -0400
commit5aae4a9ae0dd55409a42ca61b82ef1f5a840091e (patch)
treecb8c3b13ffd63304ebf6c3392e5aee664d463d25 /fs/nfs
parent94a417f3d7a02478a2d7842e693a61339fb54ea4 (diff)
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: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 0efcb55c2caa..a736160046c3 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -102,6 +102,7 @@ struct nfs_client_initdata {
102 size_t addrlen; 102 size_t addrlen;
103 const struct nfs_rpc_ops *rpc_ops; 103 const struct nfs_rpc_ops *rpc_ops;
104 int proto; 104 int proto;
105 u32 minorversion;
105}; 106};
106 107
107/* 108/*
@@ -150,6 +151,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_
150 rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS client"); 151 rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS client");
151 clp->cl_boot_time = CURRENT_TIME; 152 clp->cl_boot_time = CURRENT_TIME;
152 clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED; 153 clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED;
154 clp->cl_minorversion = cl_init->minorversion;
153#endif 155#endif
154 cred = rpc_lookup_machine_cred(); 156 cred = rpc_lookup_machine_cred();
155 if (!IS_ERR(cred)) 157 if (!IS_ERR(cred))
@@ -420,7 +422,9 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat
420 422
421 if (clp->cl_proto != data->proto) 423 if (clp->cl_proto != data->proto)
422 continue; 424 continue;
423 425 /* Match nfsv4 minorversion */
426 if (clp->cl_minorversion != data->minorversion)
427 continue;
424 /* Match the full socket address */ 428 /* Match the full socket address */
425 if (!nfs_sockaddr_cmp(sap, clap)) 429 if (!nfs_sockaddr_cmp(sap, clap))
426 continue; 430 continue;
@@ -1110,6 +1114,7 @@ static int nfs4_set_client(struct nfs_server *server,
1110 .addrlen = addrlen, 1114 .addrlen = addrlen,
1111 .rpc_ops = &nfs_v4_clientops, 1115 .rpc_ops = &nfs_v4_clientops,
1112 .proto = proto, 1116 .proto = proto,
1117 .minorversion = minorversion,
1113 }; 1118 };
1114 struct nfs_client *clp; 1119 struct nfs_client *clp;
1115 int error; 1120 int error;