Re: CONFIG_VFAT_FS_DUALNAMES regression

From: Jan Engelhardt
Date: Thu Jul 02 2009 - 21:10:20 EST



On Friday 2009-07-03 02:25, tridge@xxxxxxxxx wrote:
>
> > (All with DUALNAMES=n)
> > # mount /dev/sdc1 /mnt -o iocharset=utf8,shortnames=lower
> > # cp /mnt/dcim/100_fuji/dscf{4160,3004}.jpg
> > # umount /mnt
> > # mount /dev/sdc1 /mnt -o iocharset=utf8,shortnames=win95
> > # cp /mnt/dcim/100_fuji/dscf{4160,3005}.jpg
> > # umount /mnt
> > # mount /dev/sdc1 /mnt -o iocharset=utf8,shortnames=winnt
> > # cp /mnt/dcim/100_fuji/dscf{4160,3006}.jpg
> > # umount /mnt
> > # mount /dev/sdc1 /mnt -o iocharset=utf8,shortnames=mixed
> > # cp /mnt/dcim/100_fuji/dscf{4160,3007}.jpg
> > # umount /mnt
> >
> > Result? The camera only displays 3006.
> >
> > The dualnames patch's filling filenames with random illegal
> > chars does seems to have a really foul side-effect after
>
>actually, you've just proved the patch works as intended on your
>device!
>
>Only the shortname=winnt would create a 8.3 name when you use the
>filename dscfNNNN.jpg.

The mount(8) manpage becomes pretty ambiguous with the dualnames
patch. By default, "store a long name when the short name is not all
upper case" would apply - and is invoked because I am a lazy typist
who wrote "cp $this dscf3000" instead of "cp $this DSCF3000". Now
since dualnames=n is in effect, no long name would need to be written
because it still fits into 8.3Ââ subsequently, one would assume an
8.3 is generated for all shortname= cases.

>That is why my first patch in May forced
>
> shortname_flags = VFAT_SFN_CREATE_WINNT;

Making WINNT the default would cause many a `ls` output to just
scream at me in uppercaps because there are programs that
create long names with all-uppers.

shortname really needs to be split into "shortname that is applied
during creation" and "shortname that is applied upon readdir".

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/