Re: long filenames in FAT filesystem

From: David Jeske <jeske_at_nospam.org>
Date: Mon May 18 1998 - 14:11:15 PDT

On Mon, May 18, 1998 at 12:46:25PM -0700, Brett McCoy wrote:
> Can anyone point me at a resource that explains how Win95 and NT do long
> filenames in FAT filesystems?
>
> I can't *stand* 8.3 filenames and I really want something better.
> However, I can't use vstafs as my main filesystem right now because it
> crashes periodically, specifically when compiling everything. I'd like
> to work on debugging the vstafs filesystem code, but I need a stable
> filesystem to work on in the meantime, and the FAT filesystem code seems
> stable (if a bit slow).
>
> So, I'd like to look at adding long filenames to it. If it's done in a
> really, really grody way, then maybe I'll work on making vstafs more
> stable from the getgo (but it would be nice to use the long filenames
> under FAT).

It's pretty UGLY (VFAT) They use "extra" directory entries to store long
filename information. Basically:

1) every file has a short filename
2) long filename entries can take up multiple directory entries.
3) MS found that most programs "leave alone" files which have all attribute
   bits set (or cleared, I forget), so the long filename entries have the
   attribute bits set this way. I seem to remember something specifically
   having to do with volume/archive bits.
4) the long filename for a file has a checksum of the short filename, so
   that if a non-long filename aware program changes the short filename
   only, it breaks the link with the long filename.
5) Other information can also be stored in these "modified directory
   entries", I don't remember what exactly

I think you would be better off implementing something like UMSDOS, where
you just store extended information in a "hidden" file.

VSTa's handling of VFAT, if I remember correctly, is particularly not
good, because VSTa reads a complete directory entry, and if it's changed,
it writes out the whole entry again. Thus, just "skipping over" VFAT
filenames means that when VSTa writes out the directory again, it writes
right over what would be still valid VFAT long filenames. However, I could
be wrong about this, it was a long time ago that I looked at it.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske_at_chat.net
Received on Mon May 18 10:23:50 1998

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:43 PDT