From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: "tytso@mit.edu" <tytso@mit.edu>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 02/12] libext2fs: automatically enable meta_bg to avoid filling up BG 0
Date: Tue, 13 Oct 2015 00:08:38 -0700 [thread overview]
Message-ID: <20151013070838.GO10390@birch.djwong.org> (raw)
In-Reply-To: <6D149520-CD92-4409-B155-8FF587130557@dilger.ca>
On Mon, Oct 12, 2015 at 08:34:36PM -0600, Andreas Dilger wrote:
> The commit comment says enable meta_bg if 1/2 of the block group
> is full, but the code checks for 3/4 of the block group is full. Which one
> Should it be?
Oops. It should be 3/4 since it's generally advantageous to leave meta_bg off
as long as possible so as to keep the group descriptors nearby.
That said, I also toyed with the idea of making the switch if total overhead
(gdt + inodes) uses more than 3/4 of a BG. But the inode size/ratio is
configurable, so I went with just checking gdt for now.
--D
>
> Cheers, Andreas
>
> > On Oct 12, 2015, at 15:56, Darrick J. Wong <darrick.wong@oracle.com> wrote:
> >
> > If during formatting we'd lose more than half of a block group to
> > group descriptors and other metadata, enable the meta_bg feature.
> > This enables us to create >500T filesystems with default options.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> > lib/ext2fs/initialize.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> >
> > diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
> > index f672a27..b5ca928 100644
> > --- a/lib/ext2fs/initialize.c
> > +++ b/lib/ext2fs/initialize.c
> > @@ -381,6 +381,11 @@ ipg_retry:
> > overhead = (int) (3 + fs->inode_blocks_per_group +
> > super->s_reserved_gdt_blocks);
> >
> > + /* Enable meta_bg if we'd lose more than 3/4 of a BG to GDT blocks. */
> > + if (super->s_reserved_gdt_blocks + fs->desc_blocks >
> > + super->s_blocks_per_group * 3 / 4)
> > + fs->super->s_feature_incompat |= EXT2_FEATURE_INCOMPAT_META_BG;
> > +
> > if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
> > overhead++;
> > else
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-10-13 7:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 21:56 [PATCH 00/12] e2fsprogs: misc fixes and cleanups; save checksum seeds Darrick J. Wong
2015-10-12 21:56 ` [PATCH 01/12] libext2fs: fix maximum bg overhead calculation with meta_bg enabled Darrick J. Wong
2015-10-24 4:37 ` Theodore Ts'o
2015-10-12 21:56 ` [PATCH 02/12] libext2fs: automatically enable meta_bg to avoid filling up BG 0 Darrick J. Wong
2015-10-13 2:34 ` Andreas Dilger
2015-10-13 7:08 ` Darrick J. Wong [this message]
2015-10-24 4:38 ` Theodore Ts'o
2015-10-12 21:56 ` [PATCH 03/12] libext2fs: clean up feature test macros with predicate functions Darrick J. Wong
2015-10-24 4:41 ` Theodore Ts'o
2015-10-12 21:56 ` [PATCH 04/12] e2fsck: " Darrick J. Wong
2015-10-24 4:49 ` Theodore Ts'o
2015-10-12 21:57 ` [PATCH 05/12] misc: " Darrick J. Wong
2015-10-24 5:24 ` Theodore Ts'o
2015-10-12 21:57 ` [PATCH 06/12] resize2fs: " Darrick J. Wong
2015-10-24 5:24 ` Theodore Ts'o
2015-10-12 21:57 ` [PATCH 07/12] debugfs: " Darrick J. Wong
2015-10-24 5:26 ` Theodore Ts'o
2015-10-12 21:57 ` [PATCH 08/12] libext2fs: store checksum seed in superblock Darrick J. Wong
2015-10-12 21:57 ` [PATCH 09/12] tune2fs: allow user to turn on saving the checksum seed Darrick J. Wong
2015-10-12 21:57 ` [PATCH 10/12] e2fsck: check the checksum seed feature flag is set correctly Darrick J. Wong
2015-10-12 21:57 ` [PATCH 11/12] mke2fs: store checksum seed at format time Darrick J. Wong
2015-10-12 21:57 ` [PATCH 12/12] tests: check proper operation of metadata_csum_seed Darrick J. Wong
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=20151013070838.GO10390@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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).