aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayoutdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4filelayoutdev.c')
-rw-r--r--fs/nfs/nfs4filelayoutdev.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index 7e0be3e331d7..d4d2032c1992 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -30,12 +30,16 @@
30 30
31#include <linux/nfs_fs.h> 31#include <linux/nfs_fs.h>
32#include <linux/vmalloc.h> 32#include <linux/vmalloc.h>
33#include <linux/module.h>
33 34
34#include "internal.h" 35#include "internal.h"
35#include "nfs4filelayout.h" 36#include "nfs4filelayout.h"
36 37
37#define NFSDBG_FACILITY NFSDBG_PNFS_LD 38#define NFSDBG_FACILITY NFSDBG_PNFS_LD
38 39
40static unsigned int dataserver_timeo = NFS4_DEF_DS_TIMEO;
41static unsigned int dataserver_retrans = NFS4_DEF_DS_RETRANS;
42
39/* 43/*
40 * Data server cache 44 * Data server cache
41 * 45 *
@@ -165,8 +169,9 @@ nfs4_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds)
165 __func__, ds->ds_remotestr, da->da_remotestr); 169 __func__, ds->ds_remotestr, da->da_remotestr);
166 170
167 clp = nfs4_set_ds_client(mds_srv->nfs_client, 171 clp = nfs4_set_ds_client(mds_srv->nfs_client,
168 (struct sockaddr *)&da->da_addr, 172 (struct sockaddr *)&da->da_addr,
169 da->da_addrlen, IPPROTO_TCP); 173 da->da_addrlen, IPPROTO_TCP,
174 dataserver_timeo, dataserver_retrans);
170 if (!IS_ERR(clp)) 175 if (!IS_ERR(clp))
171 break; 176 break;
172 } 177 }
@@ -821,3 +826,12 @@ mark_dev_invalid:
821 filelayout_mark_devid_invalid(devid); 826 filelayout_mark_devid_invalid(devid);
822 return NULL; 827 return NULL;
823} 828}
829
830module_param(dataserver_retrans, uint, 0644);
831MODULE_PARM_DESC(dataserver_retrans, "The number of times the NFSv4.1 client "
832 "retries a request before it attempts further "
833 " recovery action.");
834module_param(dataserver_timeo, uint, 0644);
835MODULE_PARM_DESC(dataserver_timeo, "The time (in tenths of a second) the "
836 "NFSv4.1 client waits for a response from a "
837 " data server before it retries an NFS request.");