Re: Windows 95 (VFAT) file systems?

cjs (cjs@netcom.com)
Wed, 18 Oct 1995 11:01:07 -0700 (PDT)


> On Tue, 17 Oct 1995, Michael K. Johnson wrote:
>
> > Date: Tue, 17 Oct 1995 16:50:54 -0500
> > From: Michael K. Johnson <johnsonm@nigel.vnet.net>
> > To: Dan Merillat <harik@accessorl.net>
> > Cc: linux-kernel@vger.rutgers.edu
> > Subject: Re: Windows 95 (VFAT) file systems?
> >
> > Dan Merillat writes:
> > > Anyway, why do the drivers like ntfs/hpfs etc allways go readonly?
> > > If they have the structures etc. done enough to read the dir entrys
> > > and the files, shouldn't they be able to update them?
> >
> > Short answer: no
> > Long answer: Not necessarily.
> >
> > HPFS I know in particular uses B-trees that are very simple to read,
> > and much harder to update. I don't know of the other challenges,
> > although I assume they exist.
>
> > In general, being able to parse a data structure doesn't imply
> > knowledge of the invariants used while creating it. As an example
> > from a different domain, as I'm working on my scanner driver, I have

> > Does that help?
>
> Sort of. I can understand the problems when dealing with a scanner
> (or any unknown interface) But if you have the structure data, and
> you can read it, why are the magic incantations to write it so hard?

Take the example of BSP trees (Binary space partition). Those are the
little do-hickies responsible for the speed of the DOOM engine as they
devide up the polygons that make up the maps into areas which are
guaranteed not to be obstructed by any other area. I.e. you are in
area 1, and you can run down the tree and find all areas completely
visible to area 1 in distance order.

Reading a BSP tree is a really simple matter of following one or more
limbs of the BSP tree to its termination, sorta like a B
tree. Generating a BSP tree requires that for every polygon N, it's be
repetedly subdivided and distributed amoung another set of polygons n
so that no polygon n has an area which could be opacuqed by another
area of polygon N or another polygon. See the DOOM faq for
illustrations.

So as I'm hoping you see, generating a BSP tree requires a VASTLY
greater amount of work, and the task of writing the tree is a world
differnt then reading one. Not to mention that creating a BSP tree can
take several minutes on a decent pentium, while reading the tree can
take a fraction of a fraction of a second.

Christopher