From: Darrick J. Wong Date: Sun, 13 Oct 2013 02:31:20 +0000 (-0400) Subject: tune2fs: don't convert block # to cluster # when clearing uninit_bg X-Git-Tag: v1.43-WIP-2015-05-18~381 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=45e9ccdbb37166845f0ffc2faa3c678d1a32ae49;p=tools%2Fe2fsprogs.git tune2fs: don't convert block # to cluster # when clearing uninit_bg When we're constructing the initial block bitmap as part of removing the gdt_csum (i.e. uninit_bg) feature, we mustn't convert the block numbers to cluster numbers because ext2fs_mark_block_bitmap2() does this for us. Signed-off-by: Darrick J. Wong Signed-off-by: "Theodore Ts'o" --- diff --git a/misc/tune2fs.c b/misc/tune2fs.c index f52beab..60d1378 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -820,20 +820,17 @@ static void disable_uninit_bg(ext2_filsys fs, __u32 csum_feature_flag) /* The bbitmap is zeroed; we must mark group metadata blocks in use */ for (i = 0; i < fs->group_desc_count; i++) { b = ext2fs_block_bitmap_loc(fs, i); - ext2fs_mark_block_bitmap2(fs->block_map, EXT2FS_B2C(fs, b)); + ext2fs_mark_block_bitmap2(fs->block_map, b); b = ext2fs_inode_bitmap_loc(fs, i); - ext2fs_mark_block_bitmap2(fs->block_map, EXT2FS_B2C(fs, b)); + ext2fs_mark_block_bitmap2(fs->block_map, b); retval = ext2fs_super_and_bgd_loc2(fs, i, &b, &c, &d, NULL); if (retval == 0 && b) - ext2fs_mark_block_bitmap2(fs->block_map, - EXT2FS_B2C(fs, b)); + ext2fs_mark_block_bitmap2(fs->block_map, b); if (retval == 0 && c) - ext2fs_mark_block_bitmap2(fs->block_map, - EXT2FS_B2C(fs, c)); + ext2fs_mark_block_bitmap2(fs->block_map, c); if (retval == 0 && d) - ext2fs_mark_block_bitmap2(fs->block_map, - EXT2FS_B2C(fs, d)); + ext2fs_mark_block_bitmap2(fs->block_map, d); if (retval) { com_err("disable_uninit_bg", retval, "while initializing block bitmaps");