From: Felix Zielcke <fzielcke@z-51.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian]
Date: Wed, 18 Mar 2009 18:54:46 +0100 [thread overview]
Message-ID: <1237398886.3415.1.camel@fz.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
Any objection that I commit his patch?
-------- Weitergeleitete Nachricht --------
Von: Michel Dänzer <daenzer@debian.org>
An: Felix Zielcke <fzielcke@z-51.de>
Kopie: 520286@bugs.debian.org
Betreff: Re: Bug#520286: ext2 module fails to recognize ext4 files with
extents on big endian
Datum: Wed, 18 Mar 2009 18:41:47 +0100
On Mit, 2009-03-18 at 18:26 +0100, Felix Zielcke wrote:
> Am Mittwoch, den 18.03.2009, 18:00 +0100 schrieb Michel Dänzer:
>
> > The function grub_ext2_read_block() doesn't take endianness into account
> > when checking the inode flags for EXT4_EXTENTS_FLAG, so the check doesn't
> > work properly on big endian. The attached patch fixes this, it was necessary
> > for loading and booting a Linux kernel from an ext4 filesystem on my PowerBook.
>
> Hi,
>
> it would be nice if you could write a ChangeLog entry for this and send
> your patch directly upstream to grub-devel@gnu.org, though you need to
> subscribe first.
Last time I tried this wasn't too pleasant an experience for me I'm
afraid (as a result I filed #516458, which was fixed with a different
patch, for which I thanked the author personally). The attached includes
a ChangeLog entry, but I'd appreciate if you or someone else could take
care of getting it integrated upstream.
Thanks,
--
Felix Zielcke
[-- Attachment #2: grub2-ext4-endianness.diff --]
[-- Type: text/x-patch, Size: 851 bytes --]
--- grub2-1.96+20090317.orig/fs/ext2.c 2009-02-08 01:28:09.000000000 +0100
+++ grub2-1.96+20090317/fs/ext2.c 2009-03-18 17:29:03.000000000 +0100
@@ -385,7 +385,7 @@ grub_ext2_read_block (grub_fshelp_node_t
unsigned int blksz = EXT2_BLOCK_SIZE (data);
int log2_blksz = LOG2_EXT2_BLOCK_SIZE (data);
- if (inode->flags & EXT4_EXTENTS_FLAG)
+ if (grub_le_to_cpu32(inode->flags) & EXT4_EXTENTS_FLAG)
{
char buf[EXT2_BLOCK_SIZE(data)];
struct grub_ext4_extent_header *leaf;
--- grub2-1.96+20090317.orig/ChangeLog 2009-03-14 16:18:59.000000000 +0100
+++ grub2-1.96+20090317/ChangeLog 2009-03-18 18:39:26.000000000 +0100
@@ -0,0 +1,5 @@
+2009-03-18 Michel Dänzer <michel@daenzer.net>
+
+ * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
+ checking inode flags for EXT4_EXTENTS_FLAG.
+
next reply other threads:[~2009-03-18 17:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 17:54 Felix Zielcke [this message]
2009-03-18 18:19 ` [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian] Gregg C Levine
2009-03-19 8:23 ` Pavel Roskin
2009-03-19 9:39 ` Felix Zielcke
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=1237398886.3415.1.camel@fz.local \
--to=fzielcke@z-51.de \
--cc=grub-devel@gnu.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.