diff options
author | Steve French <sfrench@us.ibm.com> | 2011-01-20 18:06:34 (GMT) |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-01-20 18:06:34 (GMT) |
commit | fda3594362184383e73f0a2a5fa5b38ac0e04fd8 (patch) | |
tree | c196d4a5211044760debd89eec810053f0025e45 /fs/cifs/cifsfs.c | |
parent | c74093b694998d30105d9904686da5e3576497c4 (diff) | |
download | linux-fsl-qoriq-fda3594362184383e73f0a2a5fa5b38ac0e04fd8.tar.xz |
[CIFS] cifs: reconnect unresponsive servers
If the server isn't responding to echoes, we don't want to leave tasks
hung waiting for it to reply. At that point, we'll want to reconnect
so that soft mounts can return an error to userspace quickly.
If the client hasn't received a reply after a specified number of echo
intervals, assume that the transport is down and attempt to reconnect
the socket.
The number of echo_intervals to wait before attempting to reconnect is
tunable via a module parameter. Setting it to 0, means that the client
will never attempt to reconnect. The default is 5.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index d9f652a..99d777a 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -77,7 +77,11 @@ unsigned int cifs_max_pending = CIFS_MAX_REQ; module_param(cifs_max_pending, int, 0); MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. " "Default: 50 Range: 2 to 256"); - +unsigned short echo_retries = 5; +module_param(echo_retries, ushort, 0644); +MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and " + "reconnecting server. Default: 5. 0 means " + "never reconnect."); extern mempool_t *cifs_sm_req_poolp; extern mempool_t *cifs_req_poolp; extern mempool_t *cifs_mid_poolp; |