All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Valerie Clement <valerie.clement@bull.net>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>,
	Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>,
	Mingming Cao <cmm@us.ibm.com>
Subject: Re: [PATCH RESEND] ext4: Fix kernel BUG at fs/ext4/mballoc.c:910!
Date: Thu, 14 Feb 2008 15:13:17 -0700	[thread overview]
Message-ID: <20080214221317.GP3029@webber.adilger.int> (raw)
In-Reply-To: <1203006909.8970.20.camel@ext1.frec.bull.fr>

On Feb 14, 2008  17:35 +0100, Valerie Clement wrote:
> From: Valerie Clement <valerie.clement@bull.net>
> 
> With the flex_bg feature enabled, a large file creation oopses the
> kernel.
> The BUG_ON is:
> 	BUG_ON(len >= EXT4_BLOCKS_PER_GROUP(sb));
> 
> As the allocation of the bitmaps and the inode table can be done
> outside the block group with flex_bg, this allows to allocate up to
> EXT4_BLOCKS_PER_GROUP blocks in a group.
> Depending on the group size and the block size, extents might be 
> larger than BLOCKS_PER_GROUP(); use EXT_INIT_MAX_LEN instead of 
> BLOCKS_PER_GROUP().

In fact, my earlier review of this patch was incorrect, and Aneesh pointed
out the correct answer.  The ext4_mb_mark_free_simple() function is only
called from ext4_mb_generate_buddy() to generate the buddy bitmap from the
on-disk block bitmap, and in that case the @len parameter should always
be <= EXT4_BLOCKS_PER_GROUP().  I think the original patch was correct.

Sorry about the confusion.  I thought at first glance this was for
freeing the blocks from releasing an extent, but that is incorrect.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

  parent reply	other threads:[~2008-02-14 22:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14 16:35 [PATCH RESEND] ext4: Fix kernel BUG at fs/ext4/mballoc.c:910! Valerie Clement
2008-02-14 16:38 ` Eric Sandeen
2008-02-15 15:18   ` Valerie Clement
2008-02-15 15:51     ` Eric Sandeen
2008-02-14 17:43 ` Mingming Cao
2008-02-14 22:13 ` Andreas Dilger [this message]
2008-02-14 23:33   ` Mingming Cao

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=20080214221317.GP3029@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=valerie.clement@bull.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.