Re: FS Unions

Alexander Viro (viro@math.psu.edu)
Mon, 14 Jun 1999 15:22:00 -0400 (EDT)


On Mon, 14 Jun 1999, Eric Brunet wrote:

> In ens.rezo.mailing-lists.linux-kernel, you wrote:
> >All modifications go into the overlapping fs. All you need from it is a
> >way to represent whiteouts (normally done as entries with reserved
> >inumber value).
>
> I don't quite understand: do you have to modify all the filesystems to
> introduce the concept of ``whiteouts'' and ``non-transparent
> directories'' ?

Yes, unionfs needs whiteouts (for non-ro operation, that is).
To get a decent mkdir-after-rmdir semantics you will also need persistent
'non-transparent' flag (set after mkdir over whiteout). The former is
pretty easy for any UNIX fs - just use inumber == 1. The latter is
trickier and may be done either via extended flags or via directory entry
type (we need it only on directories, so the questions about multiple
links doesn't matter). You need it on the overlapping layers. BTW, 4.4
does a mildly odd thing - for files it makes copy-on-write (i.e. attempt
to open the file for write if the file is located on the lower level
copies it to the upper level). You can also imitate non-transparent stuff
simply creating whiteouts in a directory when you do mkdir-over-whiteout.

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