Re: ext3 and undeletion

Andreas Dilger
2002-03-01T01:08:59Z

On Feb 28, 2002 16:19 -0800, Rick Lindsley wrote:
> A lot of talk about "daemons" ... seems overkill to me. Any reason not
> to let each user do this on their own? I've got an rm/unrm program
> that just stores the "rescued" files in your home directory for a
> period of time based on the either the name or pathname.

Well, the daemon could be used to do only background cleanup. You could
always have the unlink wrapper do cleanup synchronously all the time,
but this might make some deletes slow. If you weren't running a daemon,
then eventually the unlink wrapper would do all of the cleanups for you.
However, it would not be possible with the unlink wrapper for one user
to force cleanup of another user's deleted files if the filesystem is
running out of space. I think having a daemon do this is far safer than
making "rm" an suid program (eek).

The other problem with moving files to the owner's home directory instead
of just renaming it to a per-filesystem .undelete directory is that this
takes a long time if they are on different filesystems, or (heaven forbid)
that the home directory is NFS mounted and you just deleted a 500MB GIMP
swap file from /tmp.

Cheers, Andreas
--
Andreas Dilger