Subject: Re: union fs changes
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Date: 12/30/1994 06:58:50
> the syscall was originally called unwhiteout. kirk changed it to
> undelete, with the intention that the semantics be extended to
> include really undeleting a file (eg using a versioning or
> journal-based filesystem).
But it doesn't do even that now.
> it seems to be that the name undelete is ok. would you have both a
> file available for undeletion, and a whiteout in existence at the
> same time?
You certainly could. It might even happen relatively often. As
someone else already noted, if you modify a file, you then have the RO
copy in the lower layer and the new copy in the upper layer. If you
then rm it, the upper-layer copy is blown away and a whiteout created.
Then when you unwhiteout() it, the lower-layer file reappears. I would
expect undelete() to resurrect the upper-layer copy - ie, what was
there before the unlink().