public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Valerie Henson <val_henson@linux.intel.com>,
	Andrew Morton <akpm@osdl.org>,
	pbadari@gmail.com, linux-kernel@vger.kernel.org,
	Ext2-devel@lists.sourceforge.net, arjan@linux.intel.com,
	zach.brown@oracle.com
Subject: Re: [Ext2-devel] [RFC] [PATCH] Reducing average ext2 fsck time through fs-wide dirty bit]
Date: Fri, 24 Mar 2006 15:01:31 -0500	[thread overview]
Message-ID: <20060324200131.GE18020@thunk.org> (raw)
In-Reply-To: <20060324192802.GK14852@schatzie.adilger.int>

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

  reply	other threads:[~2006-03-24 20:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-22  1:10 [RFC] [PATCH] Reducing average ext2 fsck time through fs-wide dirty bit] Valerie Henson
2006-03-22  8:40 ` Valerie Henson
2006-03-22 13:08 ` Alan Cox
2006-03-22 18:18   ` [Ext2-devel] " Mingming Cao
2006-03-22 18:16 ` [Ext2-devel] " Mingming Cao
     [not found]   ` <200603230011.53793.ioe-lkml@rameria.de>
2006-03-22 23:52     ` Mingming Cao
2006-03-22 19:09 ` Badari Pulavarty
2006-03-22 22:48   ` Valerie Henson
2006-03-23  1:55     ` Andrew Morton
2006-03-24 14:32       ` Valerie Henson
2006-03-24 15:35         ` Dave Kleikamp
2006-03-24 18:48         ` Andrew Morton
2006-03-24 19:13           ` Mingming Cao
2006-03-24 19:31             ` Andreas Dilger
2006-03-24 18:52         ` Theodore Ts'o
2006-03-24 19:14           ` Mingming Cao
2006-03-24 19:28         ` Andreas Dilger
2006-03-24 20:01           ` Theodore Ts'o [this message]
2006-03-24 21:00             ` Andreas Dilger
2006-03-24 21:39               ` Theodore Ts'o
2006-03-24 22:16                 ` Andreas Dilger
2006-03-25  5:13                   ` Suparna Bhattacharya
2006-03-25 17:38                   ` Ben Pfaff
2006-03-24 20:52           ` [Ext2-devel] " Matthew Wilcox
2006-03-24 21:23             ` Andreas Dilger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060324200131.GE18020@thunk.org \
    --to=tytso@mit.edu \
    --cc=Ext2-devel@lists.sourceforge.net \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbadari@gmail.com \
    --cc=val_henson@linux.intel.com \
    --cc=zach.brown@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox