find_first2 lookup behaviour on Samba with a case Insensitive FS
ddiss at sgi.com
Thu May 29 03:55:16 GMT 2008
I've been testing Samba 3.2 on a Case Insensitive (CI) XFS filesystem
with fs_capabilities set accordingly. Running into an interesting issue.
- map the CI XFS backed Samba share as z:
- open a cmd window
- mkdir lowercasedir
- cd LOWERCASEDIR
the prompt will then appear as z:\LOWERCASEDIR> rather than
z:\lowercasedir> as shown on a stock Samba (no CI filesys) or NTFS.
This is due to the name returned by a find_first2 SMB, which is obtained
via unix_convert() where:
- a stat of any case variant will succeed on a CI filesys
-> the same name is returned
- a stat of case variant will fail on case sensitive filesys
-> falls through to perform a directory scan
-> if the file is found during the directory scan, the file name
as it is stored on disk is returned
Aside from maybe confusing users, could this behaviour cause problems
I'll post the CI XFS Samba patch after a cleanup and a few runs of
James's RAW-BENCH-LOOKUP test.
More information about the samba-technical