Blame SOURCES/0011-mount.cifs-be-more-verbose-and-helpful-regarding-mou.patch

75f41f
From 368b0d656eaa0c529743d582a36a46d994b260dd Mon Sep 17 00:00:00 2001
75f41f
From: Aurelien Aptel <aaptel@suse.com>
75f41f
Date: Thu, 14 Feb 2019 12:15:44 +0100
75f41f
Subject: [PATCH 11/36] mount.cifs: be more verbose and helpful regarding mount
75f41f
 errors
75f41f
75f41f
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
75f41f
(cherry picked from commit 3a00449ea2560c1f160ca5e69a48a5078bfa1194)
75f41f
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
75f41f
---
75f41f
 mount.cifs.c | 12 +++++++++++-
75f41f
 1 file changed, 11 insertions(+), 1 deletion(-)
75f41f
75f41f
diff --git a/mount.cifs.c b/mount.cifs.c
75f41f
index ae7a899..9370f2e 100644
75f41f
--- a/mount.cifs.c
75f41f
+++ b/mount.cifs.c
75f41f
@@ -2099,6 +2099,10 @@ mount_retry:
75f41f
 		switch (errno) {
75f41f
 		case ECONNREFUSED:
75f41f
 		case EHOSTUNREACH:
75f41f
+			if (currentaddress) {
75f41f
+				fprintf(stderr, "mount error(%d): could not connect to %s",
75f41f
+					errno, currentaddress);
75f41f
+			}
75f41f
 			currentaddress = nextaddress;
75f41f
 			if (currentaddress) {
75f41f
 				nextaddress = strchr(currentaddress, ',');
75f41f
@@ -2110,6 +2114,12 @@ mount_retry:
75f41f
 			fprintf(stderr,
75f41f
 				"mount error: %s filesystem not supported by the system\n", cifs_fstype);
75f41f
 			break;
75f41f
+		case EHOSTDOWN:
75f41f
+			fprintf(stderr,
75f41f
+				"mount error: Server abruptly closed the connection.\n"
75f41f
+				"This can happen if the server does not support the SMB version you are trying to use.\n"
75f41f
+				"The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.\n");
75f41f
+			break;
75f41f
 		case ENXIO:
75f41f
 			if (!already_uppercased &&
75f41f
 			    uppercase_string(parsed_info->host) &&
75f41f
@@ -2126,7 +2136,7 @@ mount_retry:
75f41f
 			strerror(errno));
75f41f
 		fprintf(stderr,
75f41f
 			"Refer to the %s(8) manual page (e.g. man "
75f41f
-			"%s)\n", thisprogram, thisprogram);
75f41f
+			"%s) and kernel log messages (dmesg)\n", thisprogram, thisprogram);
75f41f
 		rc = EX_FAIL;
75f41f
 		goto mount_exit;
75f41f
 	}
75f41f
-- 
75f41f
1.8.3.1
75f41f