Re: EXT2_UNRM_FL

Richard Gooch (rgooch@atnf.csiro.au)
Fri, 5 Mar 1999 07:55:43 +1100


Theodore Y. Ts'o writes:
> Date: Thu, 4 Mar 1999 11:00:45 -0500 (EST)
> From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
> There is another unrelated reason why the kernel must be involved.
> You need to really delete files as the disk gets full. Polling is
> just total crap, with race conditions and extra system load. You can
> run out of disk space between two polls. That is not allowed.
>
> Polling simply means doing a quick statfs; that doesn't take much system
> load. And obviously, you want to keep a fairly large amount of free
> space to make sure the filesystem can do good block allocation --- for
> example, you might use a high and low watermark of 5% and 10% of the
> filesystem size. So unless you the user processes can consume that much
> disk space between the two polls, you'll be fine.
>
> The grand Unix design transition is to try doing things in user space
> first. If it doesn't work, then put in the minimal kernel hooks to
> allow the Right Thing to happen. In this case, the smallest hooks would
> be ones which can automatically wake up the daemon when filesystem space
> starts getting critical.

Assuming you're not suggesting calling the daemon synchronously, then
there still is a delay between when the FS starts getting full, and
when the daemon can start purging. The delay between this and when
free space becomes available may be a significant fraction of a second
(especially if a lot of small files need to be deleted to make room
for a big one). So polling once or twice a second might not have any
significant impact, anyway.

> Also, please remember that there are plenty of user-space undelete
> packages out there on the net; they apparently work just fine for
> most people who have a desire for that kind of protection.

And I still wonder whether you really need to bury this in unlink(3)
rather than rm(1).

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/