Re: update uninitialized-block-groups.patch and mballoc-core.patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Andreas Dilger wrote:
On Oct 03, 2007  15:30 +0530, 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;

Did you verify that subtracting s_first_data_block is indeed the right
thing to do.  I _think_ yes, but I didn't look at it very closely when
I wrote it late last night.


yes s_first_data_block is always decremented to find total number of blocks occupied by the reset of the group. But now looking at it again i guess i need to have
EXT4_BLOCKS_PER_GROUP(sb) *  sbi->s_groups_count

as

EXT4_BLOCKS_PER_GROUP(sb) *  (sbi->s_groups_count -1 )


Also for the last group i need to mark_end_bitmap_end from a lower value.
if ( last_group) {
group_block = ext4_blocks_count(sbi->s_es) - e32_to_cpu(sbi->s_es->s_first_data_block) -
             EXT4_BLOCKS_PER_GROUP(sb) * (sbi->s_groups_count - 1)

} else {
group_block = EXT4_BLOCKS_PER_GROUP(sb)

}


free_blocks = group_block - bit_max


mark_bitmap_end(group_block, ...)


-aneesh
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux