From Ubuntu bug report: "Since the move to DeviceKit for karmic, my removable VFAT-formatted disks are being mounted with shortnames=lower. This breaks e.g. rsync: if a file called "FOO" is created, it will actually appear named "foo". Past bugs -- e.g. https://launchpad.net/bugs/15525 and https://launchpad.net/bugs/76200, amongst others -- concluded that shortnames=winnt (or perhaps shortnames=mixed) was the correct setting, and this was indeed the case in earlier releases. shortnames=lower appears to be set in devicekit-disks's src/devkit-disks-device.c." The proposed patch is pretty straightforward, just changing "shortname=lower" to "shortname=winnt" in src/devkit-disks-device.c. However, we should have a consensus about this and fix it upstream, or not at all. Was this deliberate or just an oversight? Thanks!
It's not actually a regression from an upstream perspective, though. In Ubuntu we had a gnome-mount patch to change to shortname=mixed by default. However, I'd really like to avoid piling up patches again. There must be a generally applicable default for this, after all.
Hmm, it's shortname=lower because that's what the (upstream) kernel defaults to, see Documentation/filesystems/vfat.txt. If we change it, then e.g. various (obscure?) rsync usage patterns are fixed - but what do we break?
It's not that obscure, though. With "lower", you don't preserve case: $ rm *; touch foo; ls foo $ rm *; touch FOO; ls foo but with "winnt" you do: $ rm *; touch foo; ls foo $ rm *; touch FOO; ls FOO If you want to open a particular file, both variants are clever enough to ignore case: $ rm *; echo xx > FOO; cat foo xx $ rm *; echo xx > foo; cat FOO xx So we don't break file access, and behaviour for lower-case and MixedCase is identical, it just fixes ls/readdir() for ALLUPPERCASE file names.
So obviously this change would break software which relies on an all-uppercase file name being actually saved as all-lowercase name. The other issue is that if you create a file in all uppercase under Windows XP, it gets displayed in all-lowercase in Linux with "shortname=lower", whic is unexpected as well.
I mailed the kernel vfat maintainer for input.
Answer from the kernel vfat maintainer: > Timely question :) Primary reason is historically compatible. However, > at 2.6.32, I've decided to change default from "lower" to "mixed". > > 2.6.32 will use shortname=mixed as default.
This already landed in Linus' tree two months ago: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=955234755ce4a2c33cfc558912aa8f2148cc1fc6
Created attachment 30176 [details] [review] git formatted patch Trivial patch, but for the sake of fast "git am" love and having a meaningful changelog (and also to make my local "git rebase" work :) ), I'll attach it here.
Committed. Thanks for doing this.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.