aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/pnfs_nfs.c
diff options
context:
space:
mode:
authorPeng Tao2014-05-30 18:15:58 +0800
committerTom Haynes2015-02-03 11:06:34 -0800
commit30626f9c32f0ad5e2c4173f10fb4b1358bbba6ec (patch)
treeaaa2365a2d206f1ab4e7b93e21193ad7085f1221 /fs/nfs/pnfs_nfs.c
parent1a04c6e1a26a43305fe124a0978a3e4be861af89 (diff)
nfs41: allow LD to choose DS connection version/minor_version
flexfile layout may need to set such when making DS connections. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs_nfs.c')
-rw-r--r--fs/nfs/pnfs_nfs.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 106ee08ef52f..ad211a4e1874 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -554,6 +554,7 @@ static int _nfs4_pnfs_ds_connect(struct nfs_server *mds_srv,
struct nfs4_pnfs_ds *ds,
unsigned int timeo,
unsigned int retrans,
+ u32 minor_version,
rpc_authflavor_t au_flavor)
{
struct nfs_client *clp = ERR_PTR(-EIO);
@@ -570,7 +571,8 @@ static int _nfs4_pnfs_ds_connect(struct nfs_server *mds_srv,
clp = nfs4_set_ds_client(mds_srv->nfs_client,
(struct sockaddr *)&da->da_addr,
da->da_addrlen, IPPROTO_TCP,
- timeo, retrans, au_flavor);
+ timeo, retrans, minor_version,
+ au_flavor);
if (!IS_ERR(clp))
break;
}
@@ -601,13 +603,14 @@ out_put:
*/
void nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
struct nfs4_deviceid_node *devid, unsigned int timeo,
- unsigned int retrans, rpc_authflavor_t au_flavor)
+ unsigned int retrans, u32 version,
+ u32 minor_version, rpc_authflavor_t au_flavor)
{
if (test_and_set_bit(NFS4DS_CONNECTING, &ds->ds_state) == 0) {
int err = 0;
- err = _nfs4_pnfs_ds_connect(mds_srv, ds, timeo,
- retrans, au_flavor);
+ err = _nfs4_pnfs_ds_connect(mds_srv, ds, timeo, retrans,
+ minor_version, au_flavor);
if (err)
nfs4_mark_deviceid_unavailable(devid);
nfs4_clear_ds_conn_bit(ds);