summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorArnd Hannemann <arnd@arndnet.de>2015-11-16 17:38:28 +0100
committerSteve French <sfrench@localhost.localdomain>2016-01-14 13:39:07 -0600
commit275516cdcfa42c603c79ea42d2a7d4288d950fea (patch)
treec98d52e546d998050eeae7e73e6698c44fb73a9f /fs/cifs
parentec7147a99e33a9e4abad6fc6e1b40d15df045d53 (diff)
downloadlinux-275516cdcfa42c603c79ea42d2a7d4288d950fea.tar.bz2
Print IP address of unresponsive server
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>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/connect.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index ecb0803bdb0e..103054af9713 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -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;