All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Theodore Ts'o <tytso@mit.edu>
Cc: 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, 04 Oct 2011 06:47:12 -0500	[thread overview]
Message-ID: <4E8AF240.7010905@sandeen.net> (raw)
In-Reply-To: <1317702420-31085-2-git-send-email-tytso@mit.edu>

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...

But in any case, for the actual change at least:

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> ---
>  lib/ext2fs/initialize.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
> index 2875f97..b050a0a 100644
> --- a/lib/ext2fs/initialize.c
> +++ b/lib/ext2fs/initialize.c
> @@ -248,7 +248,7 @@ errcode_t ext2fs_initialize(const char *name, int flags,
>  	}
>  
>  retry:
> -	fs->group_desc_count = (blk_t) ext2fs_div64_ceil(
> +	fs->group_desc_count = (dgrp_t) ext2fs_div64_ceil(
>  		ext2fs_blocks_count(super) - super->s_first_data_block,
>  		EXT2_BLOCKS_PER_GROUP(super));
>  	if (fs->group_desc_count == 0) {


  reply	other threads:[~2011-10-04 11:47 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 [this message]
2011-10-04 18:05         ` Ted Ts'o
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=4E8AF240.7010905@sandeen.net \
    --to=sandeen@sandeen.net \
    --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 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.