From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Andreas Dilger <adilger@sun.com>
Cc: Sachin Sant <sachinp@in.ibm.com>,
linux-ext4@vger.kernel.org, Theodore Tso <tytso@mit.edu>
Subject: Re: EXT4: kernel BUG at fs/ext4/mballoc.c:1721!
Date: Mon, 7 Sep 2009 15:05:20 +0530 [thread overview]
Message-ID: <20090907093520.GA6079@skywalker.linux.vnet.ibm.com> (raw)
In-Reply-To: <20090904125233.GE4197@webber.adilger.int>
On Fri, Sep 04, 2009 at 06:52:33AM -0600, Andreas Dilger wrote:
> On Sep 04, 2009 14:19 +0530, Aneesh Kumar wrote:
> > Ok i am running test with the below patch. It is more invasive in that it
> > moves the need init flag check into load buddy. I guess we need to do that,
> > otherwise we will be operating with stale buddy information when
> > we have resize happening parallel. Also with the patch i posted before
> > we still have issues as explained below
> >
> > a) we check for init flag we find it doesn't need an cache init
> > b) we resize and mark the group in need for init
> > c) in load buddy we look at the pageuptodate flag and find it uptodate
> > and continue using the old buddy cache information.
>
> Why not have the resize code do the update of the buddy bitmap also?
> When we were just using the block bitmap for allocation the resize
> code would clear the bits in the bitmap just like deleting a file,
> so that it was totally coherent with any other bitmap user. Having
> the resize code do the same with the buddy (instead of only marking
> it stale and leaving it for another process to refresh) should avoid
> the race condition entirely.
>
We have EXT4_GROUP_INFO_NEED_INIT_BIT used at mutliple places. So
having ext4_mb_load_buddy check for EXT4_GROUP_INFO_NEED_INIT_BIT
flag make sense. It also allows us to consolidate the group init
in one location. Another advantage is, with ext4_mb_load_buddy checking
for EXT4_GROUP_INFO_NEED_INIT_BIT flag, we don't do reinit the buddy
cache each time we add few blocks to the group.
-aneesh
next prev parent reply other threads:[~2009-09-07 9:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 8:16 EXT4: kernel BUG at fs/ext4/mballoc.c:1721! Sachin Sant
2009-09-03 11:20 ` Aneesh Kumar K.V
2009-09-04 8:27 ` Sachin Sant
2009-09-04 8:49 ` Aneesh Kumar K.V
2009-09-04 12:52 ` Andreas Dilger
2009-09-07 9:35 ` Aneesh Kumar K.V [this message]
2009-09-07 9:38 ` [PATCH -V2 1/3] ext4: move ext4_mb_init_group around Aneesh Kumar K.V
2009-09-07 9:38 ` [PATCH -V2 2/3] ext4: check for need init flag in ext4_mb_load_buddy Aneesh Kumar K.V
2009-09-07 9:38 ` [PATCH -V2 3/3] ext4: Clarify the locking details in mballoc Aneesh Kumar K.V
2009-09-10 3:53 ` Theodore Tso
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=20090907093520.GA6079@skywalker.linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=adilger@sun.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sachinp@in.ibm.com \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).