From: "Darrick J. Wong" Subject: Re: [PATCH 01/31] tune2fs: Don't convert block # to cluster # when clearing uninit_bg Date: Thu, 3 Oct 2013 12:04:44 -0700 Message-ID: <20131003190444.GA14971@birch.djwong.org> References: <20131001012642.28415.89353.stgit@birch.djwong.org> <20131001012649.28415.17225.stgit@birch.djwong.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: tytso@mit.edu, linux-ext4@vger.kernel.org To: =?utf-8?B?THVrw6HFoQ==?= Czerner Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:34320 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754792Ab3JCTEw (ORCPT ); Thu, 3 Oct 2013 15:04:52 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org List-ID: On Thu, Oct 03, 2013 at 06:53:38PM +0200, Luk=C3=A1=C5=A1 Czerner wrote= : > On Mon, 30 Sep 2013, Darrick J. Wong wrote: >=20 > > Date: Mon, 30 Sep 2013 18:26:49 -0700 > > From: Darrick J. Wong > > To: tytso@mit.edu, darrick.wong@oracle.com > > Cc: linux-ext4@vger.kernel.org > > Subject: [PATCH 01/31] tune2fs: Don't convert block # to cluster # = when > > clearing uninit_bg > >=20 > > When we're constructing the initial block bitmap as part of removin= g the > > gdt_csum (i.e. uninit_bg) feature, we mustn't convert the block num= bers to > > cluster numbers because ext2fs_mark_block_bitmap2() does this for u= s. >=20 > I wonder if it's possible to use the old-style bitmap interface (the > one which does not understand 64-bit bitmaps). If so, then you also > need to fix ext2fs_mark_generic_bmap() (and others) so that we > convert blocks to clusters if needed. It's possible to do this (bad thing) by not specifying EXT2_FLAG_64BITS= when calling ext2fs_openfs(); see patch 26 for a quick fix. (I'm imagining that most bigalloc users probably want 64bit anyway?) (No idea, bigalloc isn't (currently) my use case.) --D >=20 > Thanks! > -Lukas >=20 > >=20 > > Signed-off-by: Darrick J. Wong > > --- > > misc/tune2fs.c | 13 +++++-------- > > 1 file changed, 5 insertions(+), 8 deletions(-) > >=20 > >=20 > > diff --git a/misc/tune2fs.c b/misc/tune2fs.c > > index ddf3259..52247e0 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 u= se */ > > for (i =3D 0; i < fs->group_desc_count; i++) { > > b =3D 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 =3D 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); > > =20 > > retval =3D ext2fs_super_and_bgd_loc2(fs, i, &b, &c, &d, NULL); > > if (retval =3D=3D 0 && b) > > - ext2fs_mark_block_bitmap2(fs->block_map, > > - EXT2FS_B2C(fs, b)); > > + ext2fs_mark_block_bitmap2(fs->block_map, b); > > if (retval =3D=3D 0 && c) > > - ext2fs_mark_block_bitmap2(fs->block_map, > > - EXT2FS_B2C(fs, c)); > > + ext2fs_mark_block_bitmap2(fs->block_map, c); > > if (retval =3D=3D 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"); > >=20 > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-ext= 4" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > >=20 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html