Re: (reiserfs) Re: Summary of how linux can best avoid the need for streams

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Thu, 1 Jul 1999 18:28:11 +0200


Richard Gooch wrote:
> I want to know what will happen when I do
> open(2) or stat(2) on a directory which is an albod.

It opens the directory of course... this is necessary for fchdir().
But its albodishness is noted by the kernel.

It's only when you call read() that something albodish happens.

stat(). It's not clear whether to return S_ISREG or S_ISDIR. Perhaps
it should simply return what's actually on the disk at the moment (it
may be a file or a directory), plus a flag S_ISALBOD which tests true
separately.

This lets you see whether you've got a file or directory on disk at the
moment. But a modified `ls' would let any S_ISALBOD show up as one, if
you want.

To most apps the distinction isn't important, since conversion between
file & directory forms takes place on demand (with read() on a dir and
readdir() on a file).

-- Jamie

ps. I'm making these suggestions, but I'm not 100% convinced about
albods.

I _am_ convinced that compound documents are a good thing, and I would
like existing, non-OpenParts and non-Bonobo tools to work with them.
E.g. Emacs, xv and gv and shell progs.

That doesn't require directories-as-documents _or_ albods: my mailer can
already invoke Emacs on an individual message easily enough. But maybe
it's needed for efficiency reasons in future.

-
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/