WineHQ

Case Insensitive Filenames

Revision as of 03:10, 18 January 2016 by RosanneDiMesio (talk | contribs) (Initial import; fix some markup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Current solution is based on scanning directories. Unfortunately, this has a number of drawbacks:

  • we scan directories a lot
  • proving a file does not exist is difficult (requires reading the entire directory)
  • performance is suboptimal (some apps suffer more than others - see http://bugs.winehq.org/show_bug.cgi?id=3817)


Possible solutions:

  • A radical solution : ["All filenames in lower case"]
  • fully implement case-insensitive in the kernel
    • lots of resistance from kernel developers for case insensitive file system support
    • TODO: add link to LKML thread
    • there was a patch for XFS that implemented this but the interface for user space was bad(TM)
    • btrfs can easily support a case insensitive index
    • the main problem seems to be to find an acceptable interface
  • add minimal support in the kernel for being able to maintain a coherent cache in user space
    • need to export a directory sequence number that already exists
    • Linus, Andrew, Ingo support the idea
    • Is inotify all the kernel support we need?
  • other methods
    • maybe, but probably a lot more complex
    • would it be easier on inherently case-insensitive filesystems? (`vfat`, `smbfs`, `ntfs`)
      • currently, these filesystems are bad for another reason: they don't support UNIX permissions very well
      • "proving a file doesn't exist" should be easy if we know that the filesystem is case-insensitive
      • `ntfs` is not fully supported (no caching or something)
      • `hfsplus` offers case insensitivity and Unix permissions. Unsure about Linux kernel status.
  • Using a case-insensitive FUSE filesystem for just the Wine folder
    • Also solves some problems with, for instance, Fallout: the game installs in one case, but the patch (which is installed by hand-extracting a zip into the fallout folder) comes with files in a different case. Wine doesn't know which file to use, so the application gets extremely weird behavior using some patched/unpatched files.
    • Seth notes: I happen to have very bad experiences using wine on fuse-fses. I might have made the mistake (lol) to run wine on zfs-fuse. It was the experience that brought me to this page: horrible. in the extreme. I'd be very weary of an additional fuse layer simply compounding the issue. Exactly *which* feature of fuse would allow this fuse-layer to perform significantly better than the current state of affairs?
    • Someone has already partially done this idea, making the ciopfs FUSE system; all that remains is to put it on top of a Wine installation (say, at wineprefixcreate time) and tell Wine to not bother looking for case-sensitive files. http://www.brain-dump.org/projects/ciopfs/

There is lots of interest on the Samba side to work on this area. Wine is not as affected (performance wise) by this problem as Samba, as desktop applications do not typically access the filesystem as heavily.


This page was last edited on 18 January 2016, at 03:10.