Re: Deletion of big files...

Rik van Riel (riel@nl.linux.org)
Sun, 16 May 1999 17:59:25 +0200 (CEST)


On Sun, 16 May 1999, Rob van Nieuwkerk wrote:
> Rik van Riel wrote:
> > On Fri, 14 May 1999, Jorge Gonzalez Villalonga wrote:
> >
> > > I have noticed that when I delete a big file (say 800MB), with a
> > > rm command, for example, the rm command does not return until the
> > > file has been deleted (or so it seems).
> >
> > Cosmetics.
> >
> > $ rm bigfile&
> >
> > will achieve exactly the same thing at no kernel
> > cost...
>
> Freeing the allocated space *is* incredibly slow under Linux
> though. On my machine (P133) it is something like 15 MB/s.
>
> Tried with HP-UX sometime ago: Not only does the rm command
> return immediatly, but the space is freed also immediatly (as
> shown by "df").

This could also be cosmetic. You cannot reuse the space
until the file is really gone. I agree that it's a nice
optimization for when your filesystem is almost full,
but I don't think it is worth the complexity.

Unless, of course, someone can produce a piece of code
that does all this in such a simple and elegant way that
we all want to have it in the kernel... (if only because
of it's elegance ;)

Rik -- Open Source: you deserve to be in control of your data.
+-------------------------------------------------------------------+
| Le Reseau netwerksystemen BV: http://www.reseau.nl/ |
| Linux Memory Management site: http://www.linux.eu.org/Linux-MM/ |
| Nederlandse Linux documentatie: http://www.nl.linux.org/ |
+-------------------------------------------------------------------+

-
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/