|
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 <[hidden email]> --- This patch makes my home directory on a samba server useable for Linux 2.6.26 again. It still needs more testing. Should apply to linux 2.6.27 too. Would it be possible to support something like this in the offical CIFS client? diff a/fs/cifs/connect.c b/fs/cifs/connect.c --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -90,6 +90,7 @@ struct smb_vol { bool nocase:1; /* request case insensitive filenames */ bool nobrl:1; /* disable sending byte range locks to srv */ bool seal:1; /* request transport encryption on share */ + bool nodfs:1; unsigned int rsize; unsigned int wsize; unsigned int sockopt; @@ -1223,6 +1224,8 @@ cifs_parse_mount_options(char *options, vol->sfu_emul = 1; } else if (strnicmp(data, "nosfu", 5) == 0) { vol->sfu_emul = 0; + } else if (strnicmp(data, "nodfs", 5) == 0) { + vol->nodfs = 1; } else if (strnicmp(data, "posixpaths", 10) == 0) { vol->posix_paths = 1; } else if (strnicmp(data, "noposixpaths", 12) == 0) { @@ -2167,6 +2170,10 @@ cifs_mount(struct super_block *sb, struc volume_info.UNC, tcon, cifs_sb->local_nls); cFYI(1, ("CIFS Tcon rc = %d", rc)); + if (volume_info.nodfs) { + tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; + cFYI(1, ("CIFS DFS disabeld (%d)", tcon->Flags)); + } } if (!rc) { atomic_inc(&pSesInfo->inUse); -- _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
On Thu, 16 Oct 2008 08:17:43 +0200
Martin Koegler <[hidden email]> wrote: > 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 <[hidden email]> > --- > > This patch makes my home directory on a samba server useable for Linux 2.6.26 > again. It still needs more testing. Should apply to linux 2.6.27 too. > > Would it be possible to support something like this in the offical CIFS client? > > diff a/fs/cifs/connect.c b/fs/cifs/connect.c > --- a/fs/cifs/connect.c > +++ b/fs/cifs/connect.c > @@ -90,6 +90,7 @@ struct smb_vol { > bool nocase:1; /* request case insensitive filenames */ > bool nobrl:1; /* disable sending byte range locks to srv */ > bool seal:1; /* request transport encryption on share */ > + bool nodfs:1; > unsigned int rsize; > unsigned int wsize; > unsigned int sockopt; > @@ -1223,6 +1224,8 @@ cifs_parse_mount_options(char *options, > vol->sfu_emul = 1; > } else if (strnicmp(data, "nosfu", 5) == 0) { > vol->sfu_emul = 0; > + } else if (strnicmp(data, "nodfs", 5) == 0) { > + vol->nodfs = 1; > } else if (strnicmp(data, "posixpaths", 10) == 0) { > vol->posix_paths = 1; > } else if (strnicmp(data, "noposixpaths", 12) == 0) { > @@ -2167,6 +2170,10 @@ cifs_mount(struct super_block *sb, struc > volume_info.UNC, > tcon, cifs_sb->local_nls); > cFYI(1, ("CIFS Tcon rc = %d", rc)); > + if (volume_info.nodfs) { > + tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; > + cFYI(1, ("CIFS DFS disabeld (%d)", tcon->Flags)); > + } > } > if (!rc) { > atomic_inc(&pSesInfo->inUse); > -- Looks reasonable to me. Igor did most of the DFS work, so I cc'ed him here. Igor, any thoughts? -- Jeff Layton <[hidden email]> _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
Sounds reasonable to me - I will queue it up or something similar
unless there are any objections. On Thu, Oct 16, 2008 at 6:43 AM, Jeff Layton <[hidden email]> wrote: > On Thu, 16 Oct 2008 08:17:43 +0200 > Martin Koegler <[hidden email]> wrote: > >> 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 <[hidden email]> >> --- >> >> This patch makes my home directory on a samba server useable for Linux 2.6.26 >> again. It still needs more testing. Should apply to linux 2.6.27 too. >> >> Would it be possible to support something like this in the offical CIFS client? >> >> diff a/fs/cifs/connect.c b/fs/cifs/connect.c >> --- a/fs/cifs/connect.c >> +++ b/fs/cifs/connect.c >> @@ -90,6 +90,7 @@ struct smb_vol { >> bool nocase:1; /* request case insensitive filenames */ >> bool nobrl:1; /* disable sending byte range locks to srv */ >> bool seal:1; /* request transport encryption on share */ >> + bool nodfs:1; >> unsigned int rsize; >> unsigned int wsize; >> unsigned int sockopt; >> @@ -1223,6 +1224,8 @@ cifs_parse_mount_options(char *options, >> vol->sfu_emul = 1; >> } else if (strnicmp(data, "nosfu", 5) == 0) { >> vol->sfu_emul = 0; >> + } else if (strnicmp(data, "nodfs", 5) == 0) { >> + vol->nodfs = 1; >> } else if (strnicmp(data, "posixpaths", 10) == 0) { >> vol->posix_paths = 1; >> } else if (strnicmp(data, "noposixpaths", 12) == 0) { >> @@ -2167,6 +2170,10 @@ cifs_mount(struct super_block *sb, struc >> volume_info.UNC, >> tcon, cifs_sb->local_nls); >> cFYI(1, ("CIFS Tcon rc = %d", rc)); >> + if (volume_info.nodfs) { >> + tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; >> + cFYI(1, ("CIFS DFS disabeld (%d)", tcon->Flags)); >> + } >> } >> if (!rc) { >> atomic_inc(&pSesInfo->inUse); >> -- > > > Looks reasonable to me. Igor did most of the DFS work, so I cc'ed him > here. Igor, any thoughts? > > -- > Jeff Layton <[hidden email]> > -- Thanks, Steve _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
In reply to this post by Jeff Layton-2
On Thu, Oct 16, 2008 at 3:43 PM, Jeff Layton <[hidden email]> wrote:
> On Thu, 16 Oct 2008 08:17:43 +0200 > Martin Koegler <[hidden email]> wrote: > >> 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 <[hidden email]> >> --- >> >> This patch makes my home directory on a samba server useable for Linux 2.6.26 >> again. It still needs more testing. Should apply to linux 2.6.27 too. >> >> Would it be possible to support something like this in the offical CIFS client? >> >> diff a/fs/cifs/connect.c b/fs/cifs/connect.c >> --- a/fs/cifs/connect.c >> +++ b/fs/cifs/connect.c >> @@ -90,6 +90,7 @@ struct smb_vol { >> bool nocase:1; /* request case insensitive filenames */ >> bool nobrl:1; /* disable sending byte range locks to srv */ >> bool seal:1; /* request transport encryption on share */ >> + bool nodfs:1; >> unsigned int rsize; >> unsigned int wsize; >> unsigned int sockopt; >> @@ -1223,6 +1224,8 @@ cifs_parse_mount_options(char *options, >> vol->sfu_emul = 1; >> } else if (strnicmp(data, "nosfu", 5) == 0) { >> vol->sfu_emul = 0; >> + } else if (strnicmp(data, "nodfs", 5) == 0) { >> + vol->nodfs = 1; >> } else if (strnicmp(data, "posixpaths", 10) == 0) { >> vol->posix_paths = 1; >> } else if (strnicmp(data, "noposixpaths", 12) == 0) { >> @@ -2167,6 +2170,10 @@ cifs_mount(struct super_block *sb, struc >> volume_info.UNC, >> tcon, cifs_sb->local_nls); >> cFYI(1, ("CIFS Tcon rc = %d", rc)); >> + if (volume_info.nodfs) { >> + tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; >> + cFYI(1, ("CIFS DFS disabeld (%d)", tcon->Flags)); >> + } >> } >> if (!rc) { >> atomic_inc(&pSesInfo->inUse); >> -- > > > Looks reasonable to me. Igor did most of the DFS work, so I cc'ed him > here. Igor, any thoughts? Acked. > -- > Jeff Layton <[hidden email]> > _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
Merged - after cleaning up some long (>80) lines and adding an
fs/cifs/README entry On Thu, Oct 16, 2008 at 11:23 AM, Q (Igor Mammedov) <[hidden email]> wrote: > On Thu, Oct 16, 2008 at 3:43 PM, Jeff Layton <[hidden email]> wrote: >> On Thu, 16 Oct 2008 08:17:43 +0200 >> Martin Koegler <[hidden email]> wrote: >> >>> 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 <[hidden email]> >>> --- >>> >>> This patch makes my home directory on a samba server useable for Linux 2.6.26 >>> again. It still needs more testing. Should apply to linux 2.6.27 too. >>> >>> Would it be possible to support something like this in the offical CIFS client? >>> >>> diff a/fs/cifs/connect.c b/fs/cifs/connect.c >>> --- a/fs/cifs/connect.c >>> +++ b/fs/cifs/connect.c >>> @@ -90,6 +90,7 @@ struct smb_vol { >>> bool nocase:1; /* request case insensitive filenames */ >>> bool nobrl:1; /* disable sending byte range locks to srv */ >>> bool seal:1; /* request transport encryption on share */ >>> + bool nodfs:1; >>> unsigned int rsize; >>> unsigned int wsize; >>> unsigned int sockopt; >>> @@ -1223,6 +1224,8 @@ cifs_parse_mount_options(char *options, >>> vol->sfu_emul = 1; >>> } else if (strnicmp(data, "nosfu", 5) == 0) { >>> vol->sfu_emul = 0; >>> + } else if (strnicmp(data, "nodfs", 5) == 0) { >>> + vol->nodfs = 1; >>> } else if (strnicmp(data, "posixpaths", 10) == 0) { >>> vol->posix_paths = 1; >>> } else if (strnicmp(data, "noposixpaths", 12) == 0) { >>> @@ -2167,6 +2170,10 @@ cifs_mount(struct super_block *sb, struc >>> volume_info.UNC, >>> tcon, cifs_sb->local_nls); >>> cFYI(1, ("CIFS Tcon rc = %d", rc)); >>> + if (volume_info.nodfs) { >>> + tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; >>> + cFYI(1, ("CIFS DFS disabeld (%d)", tcon->Flags)); >>> + } >>> } >>> if (!rc) { >>> atomic_inc(&pSesInfo->inUse); >>> -- >> >> >> Looks reasonable to me. Igor did most of the DFS work, so I cc'ed him >> here. Igor, any thoughts? > > Acked. > >> -- >> Jeff Layton <[hidden email]> >> > -- Thanks, Steve _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
This patch is a good one. It helped me with the same problem on my Samba
3.0.24 server and 2.6.27 client. I am just wondering, why it doesn't appear in the newly released kernels. It is neither in 2.6.27.2 nor in 2.6.27.3. It is not even scheduled for 2.6.27.4 ??? Steve French wrote: > Merged - after cleaning up some long (>80) lines and adding an > fs/cifs/README entry > _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
If anything, I'm pretty sure you won't see this before 2.6.28. This does
not classify as a bug/regression fix, it's new functionality (2.6.28 merge windows is open however) TTimo Michael wrote: > This patch is a good one. It helped me with the same problem on my Samba > 3.0.24 server and 2.6.27 client. > > I am just wondering, why it doesn't appear in the newly released kernels. It > is neither in 2.6.27.2 nor in 2.6.27.3. It is not even scheduled for > 2.6.27.4 ??? > > > Steve French wrote: > > >> Merged - after cleaning up some long (>80) lines and adding an >> fs/cifs/README entry >> >> > > > _______________________________________________ > linux-cifs-client mailing list > [hidden email] > https://lists.samba.org/mailman/listinfo/linux-cifs-client > _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
Well, you may be right from a technical point of view, but from a users
point of view it is very much a regression. Before kernel 2.6.25, I could use my Samba server perfectly. Now it does no longer work (and there is no workaround). So, either the Samba guys correct the DFS coding in their 3.0.24 or we need the nodfs patch in the kernel. At the moment I resort to compiling the kernels myself (although I am no kernel hacker :-( ), but that shouldn't be a long term perspective, I hope. Timothee Besset wrote: > If anything, I'm pretty sure you won't see this before 2.6.28. This does > not classify as a bug/regression fix, it's new functionality (2.6.28 > merge windows is open however) > > TTimo > > Michael wrote: >> This patch is a good one. It helped me with the same problem on my Samba >> 3.0.24 server and 2.6.27 client. >> >> I am just wondering, why it doesn't appear in the newly released kernels. >> It is neither in 2.6.27.2 nor in 2.6.27.3. It is not even scheduled for >> 2.6.27.4 ??? >> >> >> Steve French wrote: >> >> >>> Merged - after cleaning up some long (>80) lines and adding an >>> fs/cifs/README entry >>> >>> >> >> >> _______________________________________________ >> linux-cifs-client mailing list >> [hidden email] >> https://lists.samba.org/mailman/listinfo/linux-cifs-client >> _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
I am running on a patched 2.6.27 kernel myself for the same reasons. I
don't think any distro (Fedora/Debian/Ubuntu) has a stable release that is running anything newer than 2.6.24 atm, and they might pickup this patch and backport it to their own distro-flavored kernels if they want to. We'd all like things to go faster and run better, but from what I know about patches going into kernel releases, I doubt that one will make it into a 2.6.27.x - after all we're looking at several months of not working (since 2.6.25 I believe), and people would still need to add the nodfs option to their mounts to fix things .. for a bug that is on the samba server side, so this is new functionality, which incidentally allows a workaround for some buggy servers .. just saying :) TTimo Michael wrote: > Well, you may be right from a technical point of view, but from a users > point of view it is very much a regression. Before kernel 2.6.25, I could > use my Samba server perfectly. Now it does no longer work (and there is no > workaround). > > So, either the Samba guys correct the DFS coding in their 3.0.24 or we need > the nodfs patch in the kernel. > > At the moment I resort to compiling the kernels myself (although I am no > kernel hacker :-( ), but that shouldn't be a long term perspective, I hope. > > Timothee Besset wrote: > > >> If anything, I'm pretty sure you won't see this before 2.6.28. This does >> not classify as a bug/regression fix, it's new functionality (2.6.28 >> merge windows is open however) >> >> TTimo >> >> Michael wrote: >> >>> This patch is a good one. It helped me with the same problem on my Samba >>> 3.0.24 server and 2.6.27 client. >>> >>> I am just wondering, why it doesn't appear in the newly released kernels. >>> It is neither in 2.6.27.2 nor in 2.6.27.3. It is not even scheduled for >>> 2.6.27.4 ??? >>> >>> >>> Steve French wrote: >>> >>> >>> >>>> Merged - after cleaning up some long (>80) lines and adding an >>>> fs/cifs/README entry >>>> >>>> >>>> >>> _______________________________________________ >>> linux-cifs-client mailing list >>> [hidden email] >>> https://lists.samba.org/mailman/listinfo/linux-cifs-client >>> >>> > > > _______________________________________________ > linux-cifs-client mailing list > [hidden email] > https://lists.samba.org/mailman/listinfo/linux-cifs-client > _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
In reply to this post by Michael-165
On Fri, 24 Oct 2008 17:30:02 +0200
Michael <[hidden email]> wrote: > Well, you may be right from a technical point of view, but from a users > point of view it is very much a regression. Before kernel 2.6.25, I could > use my Samba server perfectly. Now it does no longer work (and there is no > workaround). > > So, either the Samba guys correct the DFS coding in their 3.0.24 or we need > the nodfs patch in the kernel. > ...or you need to update to a newer samba version. AFAIK, more recent 3.0.z samba versions have shaken out most of these bugs. -- Jeff Layton <[hidden email]> _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
Jeff Layton wrote:
> On Fri, 24 Oct 2008 17:30:02 +0200 > Michael <[hidden email]> wrote: > > >> Well, you may be right from a technical point of view, but from a users >> point of view it is very much a regression. Before kernel 2.6.25, I could >> use my Samba server perfectly. Now it does no longer work (and there is no >> workaround). >> >> So, either the Samba guys correct the DFS coding in their 3.0.24 or we need >> the nodfs patch in the kernel. >> >> > > ...or you need to update to a newer samba version. AFAIK, more recent 3.0.z > samba versions have shaken out most of these bugs. > > it breaks things for my Windows users) TTimo _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
Thanks for the suggestions :-)
The server is debian etch based. Unfortunately, 3.0.24 is the latest stable debian package. The package from the testing repository doesn't run on debian etch. Unfortunately, I also have a windows computer on the net (otherwise I would have used nfs). Let's hope that the patch makes it into 2.6.28. Michael Timothee Besset wrote: > Jeff Layton wrote: > >> ...or you need to update to a newer samba version. AFAIK, more recent >> 3.0.z samba versions have shaken out most of these bugs. >> >> > ..or more simply turn off DFS on the server (I couldn't do that though, > it breaks things for my Windows users) > > TTimo _______________________________________________ linux-cifs-client mailing list [hidden email] https://lists.samba.org/mailman/listinfo/linux-cifs-client |
| Powered by Nabble | Edit this page |
