From: "Darrick J. Wong" <djwong@us.ibm.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: "- 8" in EXT2_MAX_BLOCKS_PER_GROUP
Date: Mon, 10 Oct 2011 13:11:51 -0700 [thread overview]
Message-ID: <20111010201151.GM12447@tux1.beaverton.ibm.com> (raw)
In-Reply-To: <4E933CD0.4050003@redhat.com>
On Mon, Oct 10, 2011 at 01:43:28PM -0500, Eric Sandeen wrote:
> On 10/10/11 10:50 AM, Eric Sandeen wrote:
> > When looking at the maximal filesystem size issue, I found myself
> > wondering what the "- 8" is in here, it's not commented
> > or documented anywhere:
> >
> > #define EXT2_MAX_BLOCKS_PER_GROUP(s) (((1 << 16) - 8) * \
> > (EXT2_CLUSTER_SIZE(s) / \
> > EXT2_BLOCK_SIZE(s)))
> >
> >
> > (pre-bigalloc, it was just ((1 << 16) - 8) )
> >
> > Anyone know?
>
> Ah, Darrick pointed out
>
> http://osdir.com/ml/file-systems.ext2.devel/2006-03/msg00032.html
>
> So it would have been - 1, to not overflow __u16, but since we have
> multiples of 8, we get - 8.
>
> But now we have bg_free_blocks_count_hi, giving us 32 bits of counter.
> With EXT4_FEATURE_INCOMPAT_64BIT, MAX_BLOCKS_PER_GROUP should grow, no?
As far as I know, each group contains a block bitmap that is exactly 1 block
long, and block can be no longer than 4096 bytes in length. Therefore, a group
can have no more than 4096 * 8 = 32768 blocks, correct? To get more we'd have
to allow blocks larger than 4K (mkfs won't allow that) or change the disk
format to allow multi-block block bitmaps.
Unless of course a block bitmap can be the size of a cluster.... which afaict
is not the case.
--D
>
> -Eric
> --
> 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:[~2011-10-10 20:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 15:50 "- 8" in EXT2_MAX_BLOCKS_PER_GROUP Eric Sandeen
2011-10-10 18:43 ` Eric Sandeen
2011-10-10 20:11 ` Darrick J. Wong [this message]
2011-10-10 20:34 ` Eric Sandeen
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=20111010201151.GM12447@tux1.beaverton.ibm.com \
--to=djwong@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
/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).