Re: directory inclusion in ext2/ext3

Grant Miner
2003-07-24T01:09:14Z

I would also like this enhancement. Plan 9 is built around this
feature, and it does it as an int argument 'flag' to mount, such that
'flag' may be (these are defined in a header):

MREPL: Replace the old file by the new one. Henceforth, an evaluation of
old will be translated to the new file. If they are directories (for
mount, this condition is true by definition), old becomes a union
directory consisting of one directory (the new file).

MBEFORE: Both the old and new files must be directories. Add the
constituent files of the new directory to the union directory at old so
its contents appear first in the union. After an MBEFORE bind or mount,
the new directory will be searched first when evaluating file names in
the union directory.

MAFTER: Like MBEFORE but the new directory goes at the end of the union.

In addition, there is an MCREATE flag that can be OR'd with any of the
above. When a /create /system call (see /open/(2))
<http://plan9.bell-labs.com/magic/man2html/2/open> attempts to create in
a union directory, and the file does not exist, the elements of the
union are searched in order until one is found with MCREATE set. The
file is created in that directory; if that attempt fails, the /create
/fails.
...
(from http://plan9.bell-labs.com/magic/man2html/2/bind )

Further rationale can be provided if desired; just ask.