[Unionfs] whiteout and cow
Erez Zadok
ezk at cs.sunysb.edu
Wed Jan 16 12:13:03 EST 2008
In message <1200414235.12180.11.camel at thinix-laptop>, Paul Albrecht writes:
> Hi,
>
> I have a question about how unionfs handles file deletion when a write
> enabled file system is union mounted over a read only file system. For
> example, I do something like the following:
>
> mount -t unionfs -o dirs=/snap=rw:rofs=ro unionfs /mnt
>
> If a create and delete a file in /mnt which is not present in /rofs it
> persists as whiteout in the snap layer which is not what I would have
> expected.
>
> Why does the deleted file persist as whiteout in the /snap layer of the
> union mount?
>
> --
>
> Paul Albrecht
> _______________________________________________
> unionfs mailing list: http://unionfs.filesystems.org/
> unionfs at mail.fsl.cs.sunysb.edu
> http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs
Paul, the alternative is to scan all branches (there could be many) to
ensure that the file may not exist by that name anywhere else, and if so,
try to delete all instances of it. This was deemed too expensive and
complex.
Another possible problem is that if you choose to insert a new branch in the
middle, and you didn't have the whiteout, you may re-expose the file name
unintentionally.
You might want to take a look at our unionfs-odf version: it places
whiteouts in a separate persistent store outside the branches, not as .wh.*
files in individual branches.
Cheers,
Erez.
More information about the unionfs
mailing list