[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <470654B9.8000007@linux.vnet.ibm.com>
Date: Fri, 05 Oct 2007 20:44:01 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To: Valerie Clement <valerie.clement@...l.net>
CC: linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: update uninitialized-block-groups.patch and mballoc-core.patch
Valerie Clement wrote:
> 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.)
>
That is correct. Thanks for catching this.
Did you test the patch in the patch queue. It actually changes the above
line slightly differently.
Updated patch attached.
-aneesh
View attachment "uninitialized-block-groups.patch" of type "text/x-patch" (23747 bytes)
Powered by blists - more mailing lists