Subject: Re: union fs changes
To: None <bakul@netcom.com>
From: Charles M. Hannum <mycroft@gnu.ai.mit.edu>
List: tech-kern
Date: 12/30/1994 17:08:40
   One more problem: having to use two steps to make the lower
   layer file reappear seems counterintuitive.  I'd expect
   unlink() to just remove the upper layer file so that the
   lower layer file instantly reappears.  This is clean and
   simple.

`Clean and simple' and completely breaks the semantics of unlink(2)?
Did you forget a smilie in there?

   automagically create whiteout.  What happens if you have
   *no* write access in the upper layer but *do have* write
   access on the lower layer?  (Assuming you can have more
   layers), what happens if you have write access on one of
   the intermediate layers?  How does one remove a file from
   a lower layer?

The *only* way to make a file in the lower layer appear to be gone is
by creating a `whiteout'.  The lower layer is considered read-only.

   More problems: what happens when you remove a file, then
   create another file of the same name in the same directory
   and now want to ``unremove'' the old file?

You have to unlink(2) the new file, and then undelete(2) the whiteout.

   What happens
   when you create a new file of the same name and remove it?

You end up with a whiteout again.