Re: ext3 and undeletion

Andreas Ferber (aferber@techfak.uni-bielefeld.de)
Tue, 26 Feb 2002 19:14:09 +0100


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/