lkml.org 
[lkml]   [2011]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: CIFS: Rename bug on servers not supporting inode numbers
From
Date
Hi,

I should add that we are using iocharset=utf8 mount option which means that the dcache hash/compare functions done in the cifs module do not work because it uses nls_tolower() and nls_strnicmp() both of which for utf8 NLS in the kernel do not do anything at all and effectively behave case sensitively!

Thus this bug/problem in all likelyhood only affects utf8 iocharset users on a case-insensitive but case-preserving CIFS server that does not support server inode numbers.

That probably explains why it has not been noticed before!

We need utf8 thus we still need to fix this issue.

Best regards,

Anton

On 3 Nov 2011, at 15:20, Anton Altaparmakov wrote:

> Hi,
>
> Our CIFS server problems seem to have no end… The Novell CIFS server does not support server inode numbers (when I try the mount option I get the message it is being turned off as server does not support it) and thus each inode gets a different number each time it is accessed and it gets a different number again for each readdir call.
>
> The fun happens with rename() when the rename source and target only differ in case, e.g.
>
> touch foo
> mv foo Foo
>
> The result? Because of the difference in inode numbers, the request gets through to the CIFS module which promptly does:
>
> cifs_unlink(target_dir, target_dentry)
> rc = cifs_do_rename(…)
>
> And because the cifs_unlink() just removed the source of the rename (as it is the same as the target), "rc" comes back as -ENOENT.
>
> And indeed the file is gone so we just lost the user's file for ever. )-:
>
> We are tossing around ideas how to fix this but we would be interested in your input as to what you think the fix should be.
>
> In any case this probably should be fixed in the standard kernel CIFS module, too, and not just for us locally as this presumably affects anyone who is using the CIFS module against case-insensitive, non-server-inode-number-supporting CIFS servers...
>
> Best regards,
>
> Anton

--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-11-03 16:45    [W:0.067 / U:31.196 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site