Re: ext3 and undeletion

Andreas Ferber
2002-02-26T18:14:41Z

On Tue, Feb 26, 2002 at 09:38:22AM -0800, Mike Fedyk wrote:
>
> Basically, it would only move the files to the undelete area if the link
> count == 1. If you just decremented the link, then unlink() in glibc would
> work as it does now.

Always racy if done in userspace, unless you introduce a centralised
"unlink daemon" (hope no glibc developer reads that, they might be
tempted to implement such an abomination...):

proc1 proc2
--------------------
stat()
stat()
unlink()
unlink()

*kaboom*, blackhole opens, file is gone.

/If/ you start doing such a mess (personally I don't want undeletion
anyways), please do it at least in a correct way.

Andreas
--
Andreas Ferber - dev/consulting GmbH - Bielefeld, FRG
---------------------------------------------------------
+49 521 1365800 - af@devcon.net - www.devcon.net