The problem isn't straightforward. Simply stated, VFAT has two names for
a file, both are valid, both must be preserved, only one is visible, but
both are usable at all times. This does not map onto any UNIX filesystem
so some magic is needed.
How about a magic file in each VFAT directory which contains mappings of
long to short filenames. You only see the long names using standard UNIX
file I/O. Then backups work, because you backup the magic file too, so a
restore will put the correct short/long mappings back.
To make this work the mapping "file" (more like a proc entry really) can
have entries which don't correspond to existing files yet. If you create
a longfilename which has an existing entry, it uses that short name. Now
restores work and preserve both of the original short and long names.
The magic file must of course be something which interacts directly with
the VFAT filesystem driver. It isn't a real file, it's a set of hints to
VFAT on how to handle open/creat/rename/unlink on long filenames. It may
need very strange rules governing how read/write interacts with it.
-- Nathan Hand - Chirp Web Design - http://www.chirp.com.au/ - $e^{i\pi}+1 = 0$ Phone: +61 2 6230 1871 Fax: +61 2 6230 1515 E-mail: nathanh@chirp.com.au- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/