diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-02-21 13:50:23 (GMT) |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-03-21 16:35:38 (GMT) |
commit | 6dae51a585008535858c29b489dbf90a913d511b (patch) | |
tree | 64a5bfd5d14946ef8e36a90b37d7057364d5f542 /fs/cifs/connect.c | |
parent | bc205ed19bdb56576b291830bc3f752aef5e3923 (diff) | |
download | linux-fsl-qoriq-6dae51a585008535858c29b489dbf90a913d511b.tar.xz |
CIFS: Delete echo_retries module parm
It's the essential step before respecting MaxMpxCount value during
negotiating because we will keep only one extra slot for sending
echo requests. If there is no response during two echo intervals -
reconnect the tcp session.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 1d48901..5560e1d 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -373,12 +373,22 @@ allocate_buffers(struct TCP_Server_Info *server) static bool server_unresponsive(struct TCP_Server_Info *server) { - if (echo_retries > 0 && server->tcpStatus == CifsGood && - time_after(jiffies, server->lstrp + - (echo_retries * SMB_ECHO_INTERVAL))) { + /* + * We need to wait 2 echo intervals to make sure we handle such + * situations right: + * 1s client sends a normal SMB request + * 2s client gets a response + * 30s echo workqueue job pops, and decides we got a response recently + * and don't need to send another + * ... + * 65s kernel_recvmsg times out, and we see that we haven't gotten + * a response in >60s. + */ + if (server->tcpStatus == CifsGood && + time_after(jiffies, server->lstrp + 2 * SMB_ECHO_INTERVAL)) { cERROR(1, "Server %s has not responded in %d seconds. " "Reconnecting...", server->hostname, - (echo_retries * SMB_ECHO_INTERVAL / HZ)); + (2 * SMB_ECHO_INTERVAL) / HZ); cifs_reconnect(server); wake_up(&server->response_q); return true; |