linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valerie Clement <valerie.clement@bull.net>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: update uninitialized-block-groups.patch and mballoc-core.patch
Date: Fri, 05 Oct 2007 15:26:28 +0200	[thread overview]
Message-ID: <47063B84.7020808@bull.net> (raw)
In-Reply-To: <47036832.7030107@linux.vnet.ibm.com>

Aneesh Kumar K.V wrote:
> +    if (block_group == sbi->s_gdb_count - 1) {
> +        /*
> +         * Even though mke2fs always initialize first and last group
> +         * if some other tool enabled the EXT4_BG_BLOCK_UNINIT we need
> +         * to make sure we calculate the right free blocks
> +         */
> +        free_blocks = ext4_blocks_count(sbi->s_es) -
> +                le32_to_cpu(sbi->s_es->s_first_data_block) -
> +                (EXT4_BLOCKS_PER_GROUP(sb) * sbi->s_groups_count) -
> +                bit_max;
> +    } else {
> +        free_blocks = EXT4_BLOCKS_PER_GROUP(sb) - bit_max;
> +    }

Hi Aneesh,

I found a bug in the latest uninitialized-block-groups patch.
(block_group == sbi->s_gdb_count - 1)  must be replaced by
(block_group == sbi->s_groups_count - 1) in the ext4_init_block_bitmap() 
function.

(Seen while testing the mballoc feature with uninit_groups option 
enabled. fsck reported an error on this group.)

   Valérie

  parent reply	other threads:[~2007-10-05 13:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03 10:00 update uninitialized-block-groups.patch and mballoc-core.patch Aneesh Kumar K.V
2007-10-03 18:37 ` Andreas Dilger
2007-10-03 18:55   ` Aneesh Kumar K.V
2007-10-03 19:04     ` Aneesh Kumar K.V
2007-10-04  0:44       ` Mingming Cao
2007-10-05 13:26 ` Valerie Clement [this message]
2007-10-05 15:14   ` Aneesh Kumar K.V

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=47063B84.7020808@bull.net \
    --to=valerie.clement@bull.net \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    /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).