What is the case for preserving case under Samba ...

Conrad Minshall conrad at apple.com
Sun Jul 7 19:39:02 GMT 2002


At 3:24 PM -0700 7/7/02, Richard Sharpe wrote:
>On Sun, 7 Jul 2002, Conrad Minshall wrote:
>
>> At 7:19 PM -0700 7/4/02, Richard Sharpe wrote:

>> >The current situation with respect to preserve case = yes and case
>> >sensitive = no causes many problems.
>> >
>> >I recently ran a build of a lot of software under Windows that was mounted
>> >on a file server, and lots of really silly things happen. This software
>> >goes looking for include files in a list of directories, and every request
>> >to open a file that does not exist in a particular include directory, or
>> >one that is not the case that was first presented, causes Samba to do a
>> >readdir scan of the directory that the name was contained in. This can
>> >cause thousands to millions of scans :-(
>> >
>> >An altrnative might be to convert all names to the default case (preserve
>> >case = No) and then do case sensitive matches (case sensitive = yes).
>> >
>> >What is the down-side to this?
>>
>> Sometimes one want to simultaneously export a filesystem as both NFS and
>> CIFS (and AppleShare, in my environment).  Samba must preserve case so the
>> other protocols can behave reasonably, yes?
>
>Hmmm, I didn't explain what I wanted well enough :-)
>
>I want to preserve case sensitive behaviour for NFS and UNIX clients,
>while reducing the current high cost to CIFS users of providing
>case-insensitive behaviour.

Nice goal.  If you had a case-insensitive local filesystem, like a Mac or a
PC, then that particular performance issue wouldn't exist.  (Don't get me
wrong, I dislike case-insensitivity for many reasons, for instance it
breaks kernel "negative-name-cacheing".)

My point was only that being non-case-preserving will break other users of
the local filesystem.  A trivial & contrived example:
  client A smb-mounts sharepoint M from server S
  client B nfs-mounts M from server S
  client A creates a file in M, naming it "Foo"
  (server A creates a monocase file, "foo" for instance)
  client A finished initializing Foo
  client A appends "Foo" to file "tobeprocessed"
  client B notices the addition to "tobeprocessed"
  client B fails to find "Foo".  Oops.
In general, the point is that filenames are often imbedded into data, and
that using any non-case-preserving network file system is likely to break
case-sensitive filesystem accesses to the underlying shared metadata.  No
doubt I'm stating the obvious.  Sorry if all this was clear from my first
response.



--
Conrad Minshall, conrad at apple.com, 408 974-2749
Apple Computer, Mac OS X Core Operating Systems






More information about the samba-technical mailing list