Re: Deleting large files
From: Pavel Machek
Date: Tue May 20 2008 - 10:33:43 EST
On Wed 2008-05-07 19:14:33, Morten Welinder wrote:
> > Suppose you had an N GB file that just filled up the disk. You now
> > delete it, but get control back before it is really deleted. You
> > now start to write a new file that will eventually just fill up
> > the disk. [...]
>
> That argument ought to stop right there. If you believe that deleting a
> file will necessarily and immediately give you back the space, then you
> are wrong in the current state of the affairs already.
Not if you are the only user.
> user experience. Forking a process to do the deletion (a) is pathetic,
> (b) is not currently done, and (c) does not work: you cannot get a result
> right away, i.e., you lose error handling.
If you fork a kernel thread, you lose error handling, too.
Think -EIO when writing back bitmaps...
(Hmm, you'd have to use O_SYNC to see that, so this is probably
minor).
I guess doing freeing asynchronously would be okay in the 'close'
case...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/