Re: Drawbacks of implementing undelete entirely in user space

Ray Auchterlounie (
Thu, 4 Jul 1996 16:55:20 +0100

In article <>
Bryn Paul Arnold Jones <> wrote:

>On Mon, 24 Jun 1996, Ray Auchterlounie wrote:
>> Quotas - if deleted files count towards user quota then the facility
>Annother per user quota on undelete space would very quickly kill that

I think you would need to extensively modify the existing quota code
to do that - I think it only counts per-partition not per-directory.
It might be easier just to change the ownership of the deleted files,
recording the original owner somewhere else (undelete tools might need
to be setuid then).

>> File attributes - at filesystem level we can add file attributes like
>> ext2fs "undelete" and "secure delete", undelete can then be specified

>Well unlink doesn't delete, that only happens when the last reference to
>the file is lost, so secure deletion will happen anyway, just not
>necessarily right now (well that's the case at the moment so ....). The

I think that anyone paranoid enough to be using the secure deletion
attribute would check number of links first, and then expect rm to
delete/erase the file _now_, not in a years time when the disk gets
full, (because the IRS/FBI/Aliens/Wife is on the way with DOS disk and
sector editor _now_...).

Actually, having thought about it, there is still a window for someone
else to perhaps link to the file, so I think that you would truncate
the file first and then remove it to be sure.

Of course, then someone might have provided a helpful undelete which
traps truncate and moves the old file...

>Why does he want to lock the filesystem ? Only broken hacks (vfat under

I think he had in mind something like debugfs using /dev/hda1 or
whatever - I'm not sure whether this is a good idea on a mounted
filesystem (although read-only access would be enough to recover
files by copying).


Ray Auchterlounie                Research Student (still) at:
<>            Signal Processing Group
<>                  Cambridge University Engineering Dept.
                "Don't ask me about my thesis (TM)"