Skip to content

Commit

Permalink
Print IP address of unresponsive server
Browse files Browse the repository at this point in the history
Before this patch, only the hostname of the server
is printed when it becomes unresponsive.
This might not be helpful, if the IP-Address has
changed since initial mount when the name was
resolved (e.g. because the IPv6-Prefix changed).

This patch adds the cached IP address of the unresponsive server,
to the log message.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Steve French <sfrench@localhost.localdomain>
  • Loading branch information
Arnd Hannemann authored and Steve French committed Jan 14, 2016
1 parent ec7147a commit 275516c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,11 @@ server_unresponsive(struct TCP_Server_Info *server)
*/
if (server->tcpStatus == CifsGood &&
time_after(jiffies, server->lstrp + 2 * SMB_ECHO_INTERVAL)) {
cifs_dbg(VFS, "Server %s has not responded in %d seconds. Reconnecting...\n",
server->hostname, (2 * SMB_ECHO_INTERVAL) / HZ);
cifs_dbg(VFS, "Server %s (addr=%pISc) has not responded in "
"%d seconds. Reconnecting...\n",
server->hostname,
(struct sockaddr *)&server->dstaddr,
(2 * SMB_ECHO_INTERVAL) / HZ);
cifs_reconnect(server);
wake_up(&server->response_q);
return true;
Expand Down

0 comments on commit 275516c

Please sign in to comment.