Re: [Ext2-devel] [RFC] [PATCH] Reducing average ext2 fsck time through fs-wide dirty bit]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 24, 2006 at 12:28:02PM -0700, Andreas Dilger wrote:
> The good news, is that fixing the "ext3 clearing indirect blocks" problem
> not only allows undelete to work again, but also improves truncate
> performance because (a) we only modify 1/32 of the blocks we would in the
> old case (we don't need to modify any {d,t,}indirect blocks), (b) we do
> indirect block walking in forward direction, and could submit {d,}indirect
> block requests in a batch instead of one-at-a-time.
> 
> Fix for this problem (inode is locked already):
> - create a modified ext3_free_branches() to do tree walking and call a
>   method instead of always calling ext3_free_data->ext3_clear_blocks
> - walk inode {d,t,}indirect blocks in forward direction, count bitmaps and
>   groups that will be modified (essentially NULL ext3_free_branches method)
> - try to start a journal handle for this many blocks + 1 (inode) +
>   1 (super) + quota + EXT3_RESERVE_TRANS_BLOCKS
>   - if journal handle is too large (journal_start() returns -ENOSPC) fall
>     back to old zero-in-steps method (vast majority of cases will be OK
>     because number of modified blocks is much fewer)
> - walk inode {d,t,}indirect blocks again deleting blocks via
>   ext3_free_blocks_sb() (updates group descriptor, bitmaps, quota), but
>   not journaling or modifying the indirect blocks
> - update i_size/i_disksize/i_blocks to new value, like ext2
> - close transaction

I would love to see something like this as well (the fact that we zero
out the indirect blocks on truncate/unlink has always bothered me).
However, the thing that scares me about this is that this means we now
have to maintain *two* horribly complicated pieces of code for which
it will be very easy for bugs to creep in.  

This would be a prime candidate for trying to add the same sort of
userspace test framework which Rusty and company did for netfilter, so
we can try to test for race conditions, corner cases, etc.

						- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux