Date: Fri, 19 Nov 1999 05:37:18 +0100 (CET) From: Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de> To: freebsd-questions@FreeBSD.ORG Subject: Re: "whiteouts" in rm manpage Message-ID: <199911190437.FAA26978@dorifer.heim3.tu-clausthal.de>
next in thread | raw e-mail | index | archive | help
Dann Lunsford wrote in list.freebsd-questions:
> On Thu, Nov 18, 1999 at 04:50:54PM +0000, Richard Tobin wrote:
> > IIRC, whiteouts are (would be?) used for the union filesystem (similar
> > to Sun's "translucent" filesystem). The union filesystem allows one
> > filesystem to be mounted "over" another, where you see files in both
> > filesystems with those in the "upper" filesystem overriding those in
> > the (typically read-only) "lower". A whiteout in the upper filesystem
> > hides one in the lower, allowing you to delete files from the union.
> > Undeleting such a whited-out file would just be a question of removing
> > the whiteout to expose the original again.
>
> [...] So, what would
> you do to "white out" a file ? Create an empty file with the same
> name? Or is there some special attribute you give files on
> a union fs? Guess it's hit-the-code time.
It's a special file mode, see stat(2):
#define S_IFWHT 0160000 /* whiteout */
I guess that a file with that mode is automatically created
in the "upper" layer of a union filesystem when you try to
delete a file that is present in the "lower" layer. At least
I'm not aware of any other way to create such a special file
(and why would someone want to do that anyway?). The union
fs code should contain further details... :-)
Regards
Oliver
--
Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany
(Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)
"In jedem Stück Kohle wartet ein Diamant auf seine Geburt"
(Terry Pratchett)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911190437.FAA26978>
