[GSoC][RFC] Case Insensitive Filesystem

Marc Andre Tanner mat at brain-dump.org
Thu Mar 27 02:42:24 CDT 2008


On Wed, Mar 26, 2008 at 04:17:57PM -0700, Scott Ritchie wrote:
> Alexandre Julliard wrote:
> > Marc Andre Tanner <mat at brain-dump.org> writes:
> > 
> >> Yes that's true the case information is lost but is it really needed? 
> >> If you create the files with the original mixed case you will have to
> >> scan the whole directory in order to match it to a given filename. 
> >> And if i am not mistaken this is exactly what wine does. 
> > 
> > Yes, and that's precisely because Wine wants to preserve case, so that
> > tools that look at the filesystem directly see the right thing. If you
> > are going to store everything lowercase in the filesystem, then we could
> > just as well do that inside Wine, without a FUSE module.
> > 
> 
> It seems like we have a few goals:
> 
> * Prevent having to read the whole directory when looking for a
> case-insensitive file

So what are the different method's to achieve this? Apart from
translating every thing to lower case which i did.

> * Allow non-Wine programs to work with the cased filenames
> * Prevent the creation of conflicting files

With my proposal it basically works as long as your accessing the files
via the mount point of the fuse filesystem, however when you start messing
around with the underlying directory directly things may go wrong.

> The last one is important, as we need to have a 1:1 correspondence
> between cased and uncased files in the .wine folder to prevent breakages
> when someone, say, installs a patch with different casing from a zip file.
> 
> I don't see any reason why it would be bad to have the FUSE module
> mounted at login rather than when Wine starts.  This would make your
> Wine folder no different to other apps than, say, a vfat disk mounted
> there.  I should be able to extract a zip with file-roller containing
> "foo.txt" and have it overwrite "Foo.txt" even if Wine isn't running.

Again this will work if you do it via the mountpoint:

  mkdir -p ~/ciopfs/{data,mountpoint} && cd ~/ciopfs
  ciopfs -d data mountpoint
  echo Testdata > mountpoint/Foo.txt

at this point your directories should look like this:
 
 |-- data
 |   `-- foo.txt
 `-- mountpoint
     `-- Foo.txt

and 'getfattr -dR data' should show the original file name of foo.txt:

 # file: data/foo.txt
 user.filename="Foo.txt"

now you extract your archive in mountpoint and should get:

 |-- data
 |   `-- foo.txt
 `-- mountpoint
     `-- foo.txt

What i am trying to say is that as long as you interact with your data
via mountpoint everything is fine.

When you start creating files directly in data which are not all
lowercase they will currently simply be ignored.

So the question is whether it is acceptable to say: don't touch data
directly do everything via mountpoint? 

Regards,
Marc

-- 
 Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0



More information about the wine-devel mailing list