diff options
author | Steve French <sfrench@us.ibm.com> | 2008-10-16 14:35:21 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-10-16 14:35:21 -0400 |
commit | 2c1b861539c15491593625920058e06452cd3747 (patch) | |
tree | 0ba78f807ff7d3eba8174462f6bde28f8e0dc987 /fs | |
parent | 7591103c08abade60aeddb432ed0686ddd0de1c6 (diff) |
[CIFS] Add nodfs mount option
Older samba server (eg. 3.0.24 from Debian etch) don't work correctly,
if DFS paths are used. Such server claim that they support DFS, but fail
to process some requests with DFS paths. Starting with Linux 2.6.26,
the cifs clients starts sending DFS paths in such situations, rendering
it unuseable with older samba servers.
The nodfs mount options forces a share to be used with non DFS paths,
even if the server claims, that it supports it.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Acked-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/README | 3 | ||||
-rw-r--r-- | fs/cifs/connect.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/fs/cifs/README b/fs/cifs/README index bd2343d4c6a6..cbe26fe40120 100644 --- a/fs/cifs/README +++ b/fs/cifs/README | |||
@@ -463,6 +463,9 @@ A partial list of the supported mount options follows: | |||
463 | with cifs style mandatory byte range locks (and most | 463 | with cifs style mandatory byte range locks (and most |
464 | cifs servers do not yet support requesting advisory | 464 | cifs servers do not yet support requesting advisory |
465 | byte range locks). | 465 | byte range locks). |
466 | nodfs Disable DFS (global name space support) even if the | ||
467 | server claims to support it. This can help work around | ||
468 | a problem with parsing of DFS paths with Samba 3.0.24 server. | ||
466 | remount remount the share (often used to change from ro to rw mounts | 469 | remount remount the share (often used to change from ro to rw mounts |
467 | or vice versa) | 470 | or vice versa) |
468 | cifsacl Report mode bits (e.g. on stat) based on the Windows ACL for | 471 | cifsacl Report mode bits (e.g. on stat) based on the Windows ACL for |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4c13bcdb92a5..17ca8ce81bb7 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -90,6 +90,7 @@ struct smb_vol { | |||
90 | bool nocase:1; /* request case insensitive filenames */ | 90 | bool nocase:1; /* request case insensitive filenames */ |
91 | bool nobrl:1; /* disable sending byte range locks to srv */ | 91 | bool nobrl:1; /* disable sending byte range locks to srv */ |
92 | bool seal:1; /* request transport encryption on share */ | 92 | bool seal:1; /* request transport encryption on share */ |
93 | bool nodfs:1; | ||
93 | unsigned int rsize; | 94 | unsigned int rsize; |
94 | unsigned int wsize; | 95 | unsigned int wsize; |
95 | unsigned int sockopt; | 96 | unsigned int sockopt; |
@@ -1218,6 +1219,8 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1218 | vol->sfu_emul = 1; | 1219 | vol->sfu_emul = 1; |
1219 | } else if (strnicmp(data, "nosfu", 5) == 0) { | 1220 | } else if (strnicmp(data, "nosfu", 5) == 0) { |
1220 | vol->sfu_emul = 0; | 1221 | vol->sfu_emul = 0; |
1222 | } else if (strnicmp(data, "nodfs", 5) == 0) { | ||
1223 | vol->nodfs = 1; | ||
1221 | } else if (strnicmp(data, "posixpaths", 10) == 0) { | 1224 | } else if (strnicmp(data, "posixpaths", 10) == 0) { |
1222 | vol->posix_paths = 1; | 1225 | vol->posix_paths = 1; |
1223 | } else if (strnicmp(data, "noposixpaths", 12) == 0) { | 1226 | } else if (strnicmp(data, "noposixpaths", 12) == 0) { |
@@ -2197,6 +2200,12 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2197 | volume_info.UNC, | 2200 | volume_info.UNC, |
2198 | tcon, cifs_sb->local_nls); | 2201 | tcon, cifs_sb->local_nls); |
2199 | cFYI(1, ("CIFS Tcon rc = %d", rc)); | 2202 | cFYI(1, ("CIFS Tcon rc = %d", rc)); |
2203 | if (volume_info.nodfs) { | ||
2204 | tcon->Flags &= | ||
2205 | ~SMB_SHARE_IS_IN_DFS; | ||
2206 | cFYI(1, ("DFS disabled (%d)", | ||
2207 | tcon->Flags)); | ||
2208 | } | ||
2200 | } | 2209 | } |
2201 | if (!rc) { | 2210 | if (!rc) { |
2202 | atomic_inc(&pSesInfo->inUse); | 2211 | atomic_inc(&pSesInfo->inUse); |