CIFS: Rename bug on servers not supporting inode numbers

Anton Altaparmakov aia21 at cam.ac.uk
Thu Nov 3 17:25:12 MDT 2011


Hi,

On 3 Nov 2011, at 17:40, Jeff Layton wrote:
> On Thu, 3 Nov 2011 15:42:13 +0000 Anton Altaparmakov <aia21 at cam.ac.uk> wrote:
>> 
>> 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.

> I'm confused...
> 
> If the filesystem being served out by the server is using utf8, then
> how is it handling the case-insensitivity?


The file system being served is NSS (the Netware one but now mounted on Open Enterprise Server with Linux kernel rather than actual Netware kernel).  No idea how it works I am afraid.  It supports lots of different namespaces as well as being case-insensitive and case preserving when using the LONG name space (which is now being served through CIFS).

If it was NTFS or exFAT I could tell you exactly how they work (each volume has an upcase table mapping the 65536 UCS-2 Unicode characters to their upper case equivalents and each 16-bit character is upper-cased individually, more recently Windows has switched to using UTF-16 instead of UCS-2 and the upcase table changed when that happened though it remained the same size and I think for file system purposes the fact that there are surrogates in the above UCS-2   Unicode range is simply ignored)...

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/



More information about the samba-technical mailing list