All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: "Richard W.M. Jones" <rjones@redhat.com>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 2/2] libext2fs: fix bad cast which causes problems for file systems > 512EB
Date: Tue, 4 Oct 2011 14:05:55 -0400	[thread overview]
Message-ID: <20111004180555.GB10007@thunk.org> (raw)
In-Reply-To: <4E8AF240.7010905@sandeen.net>

On Tue, Oct 04, 2011 at 06:47:12AM -0500, Eric Sandeen wrote:
> On 10/3/11 11:27 PM, Theodore Ts'o wrote:
> > If the number of block groups exceeds 2**32, a bad cast would lead to
> > a bogus "Not enough space to build proposed filesystem while setting
> > up superblock" failure.
> 
> It's the proper cast now, but I don't think it fixes the problem, since they
> are both __u32...

Hmm, yes.

And to be quite honest I'm not sure it's worth fixing.  2**32 block
groups gets us up to 2**59 bytes assuming 4k blocks.  The theoretical
maximum given the current extent tree format is 2**60 assuming 4k
blocks.  So changing dgrp_t to be 64-bits just to get that last power
of two (i.e., from 512EB to a full PB) doesn't seem worth it.  Simply
using a bigalloc cluster size of 8k would make the problem go away
(and arguably we'd probably want a large cluster size if someone
wanted to create a file system that big anyway).

So maybe we should just check to see if the required number of block
groups is greater than 2**32, and if so, give an error.

       	  	       	      	  - Ted

  reply	other threads:[~2011-10-04 18:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 21:55 mkfs'ing a 48-bit fs... or not Eric Sandeen
2011-10-04  4:00 ` Ted Ts'o
2011-10-04  4:26   ` [PATCH 1/2] Add "big" and "huge" types to mke2fs.conf Theodore Ts'o
2011-10-04  4:27     ` [PATCH 2/2] libext2fs: fix bad cast which causes problems for file systems > 512EB Theodore Ts'o
2011-10-04 11:47       ` Eric Sandeen
2011-10-04 18:05         ` Ted Ts'o [this message]
2011-10-04 18:15           ` Eric Sandeen
2011-10-04  5:31   ` mkfs'ing a 48-bit fs... or not Andreas Dilger
2011-10-04  4:03 ` Eric Sandeen
2011-10-04  4:28   ` Ted Ts'o
2011-10-04  7:06 ` Richard W.M. Jones

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=20111004180555.GB10007@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=rjones@redhat.com \
    --cc=sandeen@sandeen.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.