Re: Deletion of big files...

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Thu, 20 May 1999 08:04:43 +0200 (MEST)


Alexander Viro wrote:
>
>
> On Wed, 19 May 1999, Rogier Wolff wrote:
>
> > Alexander Viro wrote:
> > >
> > >
> > > On Tue, 18 May 1999, Rogier Wolff wrote:
> > >
> > > > Guys, this is all convoluted ways of fighting symptoms. The cause of
> > > > "rm taking a long time" is that the indirect blocks are scattered all
> > > > over the disk.
> > >
> > > Nope. It is $DEITY-awful amount of waiting/retries/schedule() calls in
> > > ext2_truncate(). Look and you'll see. That, and zeroing indirect blocks
> > > (unnecessary for this usage of ext2_truncate()).
> >
> > Ok, So we could speed things up a bit by not writing back the indirect
> > blocks. Under minix-fs, datablocks that got freed before getting
> > written to disk (e.g. a tempfile from the compiler), would never get
> > written. I've been told that ext2fs does the same. Doesn't the same
> > hold for the indirectblocks? They should get freed after getting
> > zeroed, and then never getten written to disk.
>
> Sorry, no. Doesn't work that way.

It does. Check the source. It is the "bforget" call that makes the
datablocks and indirect blocks in the buffer cache "forgotten" even
when they are dirty.

Regards,

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------

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