nfs41: nfs_client.cl_minorversion
authorBenny Halevy <bhalevy@panasas.com>
Wed, 1 Apr 2009 13:21:49 +0000 (09:21 -0400)
committerBenny Halevy <bhalevy@panasas.com>
Wed, 17 Jun 2009 17:46:16 +0000 (10:46 -0700)
This field is set to the nfsv4 minor version for this mount.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Note: This patch sets the referral to the same minorversion as the
current mount. Revisit in future patch.

Signed-off-by: Andy Adamson <andros@netapp.com>
[removed cl_minorversion assignment in nfs_set_client]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[always define nfs_client.cl_minorversion]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/client.c
include/linux/nfs_fs_sb.h

index 75c9cd2aa1194e0f0c4ac754ae2b85e722ce5809..0efcb55c2caad0e880c8a3384165453dbbb52832 100644 (file)
@@ -1101,7 +1101,8 @@ static int nfs4_set_client(struct nfs_server *server,
                const size_t addrlen,
                const char *ip_addr,
                rpc_authflavor_t authflavour,
-               int proto, const struct rpc_timeout *timeparms)
+               int proto, const struct rpc_timeout *timeparms,
+               u32 minorversion)
 {
        struct nfs_client_initdata cl_init = {
                .hostname = hostname,
@@ -1164,7 +1165,8 @@ static int nfs4_init_server(struct nfs_server *server,
                        data->client_address,
                        data->auth_flavors[0],
                        data->nfs_server.protocol,
-                       &timeparms);
+                       &timeparms,
+                       data->minorversion);
        if (error < 0)
                goto error;
 
@@ -1282,7 +1284,8 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
                                parent_client->cl_ipaddr,
                                data->authflavor,
                                parent_server->client->cl_xprt->prot,
-                               parent_server->client->cl_timeout);
+                               parent_server->client->cl_timeout,
+                               parent_client->cl_minorversion);
        if (error < 0)
                goto error;
 
index 6ad75948cbf76613fb18c69069c0ccc8efdf580a..e9a51fe46aa3a6409d31a6c9f55919a5f9b11de1 100644 (file)
@@ -32,6 +32,7 @@ struct nfs_client {
        const struct nfs_rpc_ops *rpc_ops;      /* NFS protocol vector */
        int                     cl_proto;       /* Network transport protocol */
 
+       u32                     cl_minorversion;/* NFSv4 minorversion */
        struct rpc_cred         *cl_machine_cred;
 
 #ifdef CONFIG_NFS_V4
@@ -63,7 +64,7 @@ struct nfs_client {
         */
        char                    cl_ipaddr[48];
        unsigned char           cl_id_uniquifier;
-#endif
+#endif /* CONFIG_NFS_V4 */
 
 #ifdef CONFIG_NFS_FSCACHE
        struct fscache_cookie   *fscache;       /* client index cache cookie */