Bug 10682 - retrying the mount with uppercased hostname, sharename and prefix doesn't work anymore (e.g. during OS/2 mounts)
Summary: retrying the mount with uppercased hostname, sharename and prefix doesn't wor...
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: user space tools (show other bugs)
Version: 2.6
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Jeff Layton
QA Contact:
Depends on:
Reported: 2014-07-01 14:43 UTC by Guenter Kukkukk
Modified: 2014-10-19 00:26 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Guenter Kukkukk 2014-07-01 14:43:24 UTC
since (kernel module) commit:

the unc, target and prefixpath mount options are no longer used.

In mount.cifs.c, when getting errno=ENXIO, the mount is retried by uppercasing
hostname, sharename and prefixpath in the "unc=..." mount option, which
is ignored now in the kernel.
This leads to a permanent failure e.g. during mounting an OS/2 share, see thread

Fix this by also uppercasing the now used "orig_dev":

diff --git a/mount.cifs.c b/mount.cifs.c
index 497665d..3535096 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -2097,7 +2097,8 @@ mount_retry:
                        if (!already_uppercased &&
                            uppercase_string(parsed_info->host) &&
                            uppercase_string(parsed_info->share) &&
-                           uppercase_string(parsed_info->prefix)) {
+                           uppercase_string(parsed_info->prefix) &&
+                           uppercase_string(orig_dev)) {
                                        "Retrying with upper case share name\n");
                                already_uppercased = 1;

Signed-off-by: Guenter Kukkukk <kukks@samba.org>

Cheers, Günter
Comment 1 Jeff Layton 2014-07-01 14:47:48 UTC
Well spotted. Looks like a straightforward fix. Guenter, do you mind sending the patch to me via email and cc'ing the mailing list with a proper signed-off-by line, etc? I'll plan to merge it in a few days, assuming that no one objects.
Comment 2 Steve French 2014-10-19 00:26:23 UTC
This is in cifs-utils (version 6.4 and later). Should be fixed now