All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Staubach <staubach@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH]: ext4: fix big endian
Date: Thu, 06 Nov 2008 11:06:25 -0500	[thread overview]
Message-ID: <49131601.50407@redhat.com> (raw)
In-Reply-To: <200811061651.49602.borntraeger@de.ibm.com>

Christian Borntraeger wrote:
> Ok, I think I found it:
>
> On big endianess plattforms newly created ext4 file systems cannot be mounted
> and show messages like:
> [6923911.715968] EXT4-fs: not enough memory for 522250 flex groups
> [6923911.715973] EXT4-fs: unable to initialize flex_bg meta info!
>
> We have to access s_reserved_gdb_blocks with le16_to_cpu.
>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  fs/ext4/super.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: kvm/fs/ext4/super.c
> ===================================================================
> --- kvm.orig/fs/ext4/super.c
> +++ kvm/fs/ext4/super.c
> @@ -1455,7 +1455,7 @@ static int ext4_fill_flex_info(struct su
>  
>  	/* We allocate both existing and potentially added groups */
>  	flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) +
> -			    ((sbi->s_es->s_reserved_gdt_blocks +1 ) <<
> +			    (le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks + 1) <<
>   

I suspect that you want to do the le16_to_cpu() and _then_
add the 1.  Otherwise, adding 1 to a different byte order
value won't do quite what is expected or hoped for...

       ps

>  			      EXT4_DESC_PER_BLOCK_BITS(sb))) /
>  			   groups_per_flex;
>  	sbi->s_flex_groups = kzalloc(flex_group_count *
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>   


  reply	other threads:[~2008-11-06 16:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 15:00 EXT4-fs: not enough memory for 522250 flex groups Christian Borntraeger
2008-11-06 15:51 ` [PATCH]: ext4: fix big endian (was: not enough memory for 522250 flex groups) Christian Borntraeger
2008-11-06 16:06   ` Peter Staubach [this message]
2008-11-06 16:15     ` [PATCH]: ext4: fix big endian Christian Borntraeger
2008-11-06 16:32       ` Aneesh Kumar K.V
2008-11-06 16:38     ` Christoph Hellwig
2008-11-06 17:11       ` Christian Borntraeger
2008-11-06 17:33       ` Theodore Tso
2008-11-06 17:39         ` Christoph Hellwig
2008-11-06 17:39         ` Christoph Hellwig
2008-11-06 17:39           ` Christoph Hellwig
2008-11-06 17:48           ` Alexey Dobriyan
2008-11-08 22:35           ` Jörn Engel
2008-11-08 22:35             ` Jörn Engel
2008-11-10 18:09             ` Harvey Harrison
2008-11-10 18:09               ` Harvey Harrison
2008-11-10 19:31               ` Jörn Engel
2008-11-10 19:31                 ` Jörn Engel
2008-11-06 16:06   ` [PATCH]: ext4: fix big endian (was: not enough memory for 522250 flex groups) Andreas Schwab
2008-11-06 16:06     ` Andreas Schwab
2008-11-06 16:59   ` Theodore Tso

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=49131601.50407@redhat.com \
    --to=staubach@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.