Re: Implementing Meta File information in Linux

Nathan Hand (nathanh@chirp.com.au)
Tue, 25 Aug 1998 21:01:52 +1000 (EST)


On Tue, 25 Aug 1998, Chris Wedgwood wrote:

> On Mon, Aug 24, 1998 at 05:30:51PM +0200, Andi Kleen wrote:
>
> > "Sebastiano Tine'" <mb027878@flashnet.it> writes:
>
> > > I have named it "Meta File Information". They consists in data
> > > associated with the single file that user process can set and
> > > read.
> >
> > > Does anyone ever thinked on it or implemented in some way ? I
> > > need tips and suggestions on possible implementations.
> >
> > It is already implemented. It is called a "directory".
>
> Yup... and IMO its a good way to do it.
>
> MacOS files can fork into two - but why two? Is two really that
> special in this case? And why can't these forks have forks?

The original Macintosh didn't support folders (aka directories) and
as a result we have the brain-damaged concept of forks. If they had
a hiearchial filesystem from the word "go" forks wouldn't exist.

> NT has multiple forks, but those forks can't fork, etc.

It certainly makes no sense in a graphical environment, because the
GUI can just as easily manipulate a directory containing "forks" as
it can manipulate a file containing forks.

It *can* make sense when you need to support both a GUI environment
and a legacy command line environment that expects to work directly
with files, or to support legacy programming APIs.

> I though about this one for a long time once when I was keen on the
> metadata idea and decided directories are the most sane way of doing
> this. If you want fancy stuff, then make a library that know how to
> handle different bits in each directory, etc.
>
> I think NeXT did something like this?

Yes. To the GUI user, there is no practical difference. There is a
slight difference to the programmer or command line user. The fork
concept is an abstraction that doesn't belong in the kernel.

Of course the argument can be made that timestamps, perms, etc are
all metadata and all of them could be abstracted using directories
with multiple "forks".

-
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.altern.org/andrebalsa/doc/lkml-faq.html