xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xen-devel@lists.xen.org
Subject: Re: Xen 4.2 (missing) pygrub support for ext4 on rhel5/centos5 e4fsprogs..
Date: Wed, 5 Sep 2012 10:05:50 +0100	[thread overview]
Message-ID: <504715EE.2070606@citrix.com> (raw)
In-Reply-To: <20120905030239.GJ8912@reaktio.net>

[-- Attachment #1: Type: text/plain, Size: 4436 bytes --]

On 05/09/12 04:02, Pasi Kärkkäinen wrote:
> Hello,
>
> Roger: If I didn't mix up people we had a chat about this at XenSummit :) 
> so here's some info about the ext4 stuff on rhel5/centos5.
>
> # yum search e4fsprogs
> e4fsprogs.x86_64 : Utilities for managing the fourth extended (ext4) filesystem
> e4fsprogs-devel.i386 : Ext4 filesystem-specific static libraries and headers
> e4fsprogs-devel.x86_64 : Ext4 filesystem-specific static libraries and headers
> e4fsprogs-libs.i386 : Ext4 filesystem-specific static libraries and headers
> e4fsprogs-libs.x86_64 : Ext4 filesystem-specific static libraries and headers
>
> # rpm -ql e4fsprogs-libs.i386
> /lib/libe4p.so.2
> /lib/libe4p.so.2.3
> /lib/libext4fs.so.2
> /lib/libext4fs.so.2.4
>
> # rpm -ql e4fsprogs-libs.x86_64
> /lib64/libe4p.so.2
> /lib64/libe4p.so.2.3
> /lib64/libext4fs.so.2
> /lib64/libext4fs.so.2.4
>
> # rpm -ql e4fsprogs-devel.i386
> /usr/include/e4p
> /usr/include/e4p/e2p.h
> /usr/include/ext4fs
> /usr/include/ext4fs/bitops.h
> /usr/include/ext4fs/ext2_err.h
> /usr/include/ext4fs/ext2_ext_attr.h
> /usr/include/ext4fs/ext2_fs.h
> /usr/include/ext4fs/ext2_io.h
> /usr/include/ext4fs/ext2_types-i386.h
> /usr/include/ext4fs/ext2_types.h
> /usr/include/ext4fs/ext2fs.h
> /usr/include/ext4fs/ext3_extents.h
> /usr/include/ext4fs/tdb.h
> /usr/lib/libe4p.a
> /usr/lib/libe4p.so
> /usr/lib/libext4fs.a
> /usr/lib/libext4fs.so
> /usr/lib/pkgconfig/e4p.pc
> /usr/lib/pkgconfig/ext4fs.pc
> /usr/share/info/libext4fs.info.gz
>
> # rpm -ql e4fsprogs-devel.x86_64
> /usr/include/e4p
> /usr/include/e4p/e2p.h
> /usr/include/ext4fs
> /usr/include/ext4fs/bitops.h
> /usr/include/ext4fs/ext2_err.h
> /usr/include/ext4fs/ext2_ext_attr.h
> /usr/include/ext4fs/ext2_fs.h
> /usr/include/ext4fs/ext2_io.h
> /usr/include/ext4fs/ext2_types-x86_64.h
> /usr/include/ext4fs/ext2_types.h
> /usr/include/ext4fs/ext2fs.h
> /usr/include/ext4fs/ext3_extents.h
> /usr/include/ext4fs/tdb.h
> /usr/lib64/libe4p.a
> /usr/lib64/libe4p.so
> /usr/lib64/libext4fs.a
> /usr/lib64/libext4fs.so
> /usr/lib64/pkgconfig/e4p.pc
> /usr/lib64/pkgconfig/ext4fs.pc
> /usr/share/info/libext4fs.info.gz
>
>
> And then some info about the included files in the stock rhel5/centos5 Xen rpms (Xen 3.1.2),
> where pygrub does support ext4 using e4fsprogs-libs:
>
>
> # rpm -ql xen-libs | grep fsimage
> /usr/lib64/fs/ext2fs-lib/fsimage.so
> /usr/lib64/fs/fat/fsimage.so
> /usr/lib64/fs/iso9660/fsimage.so
> /usr/lib64/fs/reiserfs/fsimage.so
> /usr/lib64/fs/ufs/fsimage.so
> /usr/lib64/libfsimage.so.1.0
> /usr/lib64/libfsimage.so.1.0.0
> /usr/lib/fs/ext2fs-lib/fsimage.so
> /usr/lib/fs/fat/fsimage.so
> /usr/lib/fs/iso9660/fsimage.so
> /usr/lib/fs/reiserfs/fsimage.so
> /usr/lib/fs/ufs/fsimage.so
> /usr/lib/libfsimage.so.1.0
> /usr/lib/libfsimage.so.1.0.0
>
> # ldd /usr/lib/fs/ext2fs-lib/fsimage.so
>         linux-gate.so.1 =>  (0xffffe000)
>         libfsimage.so.1.0 => /usr/lib/libfsimage.so.1.0 (0xf7f09000)
>         libext4fs.so.2 => /lib/libext4fs.so.2 (0xf7edb000)
>         libc.so.6 => /lib/libc.so.6 (0xf7d82000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0xf7d68000)
>         libcom_err.so.2 => /lib/libcom_err.so.2 (0xf7d64000)
>         /lib/ld-linux.so.2 (0x00778000)
>
>
> # ldd /usr/lib64/fs/ext2fs-lib/fsimage.so
>         linux-vdso.so.1 =>  (0x00007fff9cffd000)
>         libfsimage.so.1.0 => /usr/lib64/libfsimage.so.1.0 (0x00002adbbef0e000)
>         libext4fs.so.2 => /lib64/libext4fs.so.2 (0x00002adbbf111000)
>         libc.so.6 => /lib64/libc.so.6 (0x00002adbbf340000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00002adbbf697000)
>         libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002adbbf8b2000)
>         /lib64/ld-linux-x86-64.so.2 (0x00000039dce00000)
>
> So el5 stock Xen rpms provide ext2fs-lib/fsimage.so, which is linked against libext4fs.so.2,
> and pygrub loads/uses fsimage.so.
>
>
> Can you guys please post the patch/hack you're currently using with XenServer/XCP,
> so we can decide what'd be the best way to get Xen 4.2 pygrub supporting ext4 also on el5 ? 

Attached, but it is very brutal as far as hacks go, and not suitable for
upstreaming in its current form.

~Andrew

>
>
> Thanks,
>
> -- Pasi
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com


[-- Attachment #2: centos5-libe4fs-hack.patch --]
[-- Type: text/x-patch, Size: 1129 bytes --]

# HG changeset patch
# Parent d341f05a3640a1f4cd92f7b8eefb4d221c13b408
Work around RHEL5's ext2fs/ext4fs split.

We need to link against a new enough version of libext2fs to be able to
read ext4 partitions.  This is only needed because RHEL5 puts the latest
ext2 libs in their own directory.  Other distros (and other RHELs) work
fine already.

This a hard-hack; a proper fix would add the check to configure.  This
patch can be simply removed when we move to Centos 6.

diff --git a/tools/libfsimage/ext2fs-lib/Makefile b/tools/libfsimage/ext2fs-lib/Makefile
--- a/tools/libfsimage/ext2fs-lib/Makefile
+++ b/tools/libfsimage/ext2fs-lib/Makefile
@@ -4,7 +4,7 @@ LIB_SRCS-y = ext2fs-lib.c
 
 FS = ext2fs-lib
 
-FS_LIBDEPS = -lext2fs
+FS_LIBDEPS = -lext4fs
 
 .PHONY: all
 all: fs-all
diff --git a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
--- a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
+++ b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
@@ -22,7 +22,7 @@
  */
 
 #include <fsimage_plugin.h>
-#include <ext2fs/ext2fs.h>
+#include <ext4fs/ext2fs.h>
 #include <errno.h>
 #include <inttypes.h>
 

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2012-09-05  9:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05  3:02 Xen 4.2 (missing) pygrub support for ext4 on rhel5/centos5 e4fsprogs Pasi Kärkkäinen
2012-09-05  9:05 ` Andrew Cooper [this message]
2012-09-05 12:03 ` [PATCH] libfsimage: add ext4 support for CentOS 5.x Roger Pau Monne
2012-09-05 18:04   ` Ian Campbell
2012-09-05 20:55     ` Pasi Kärkkäinen
2012-09-06  7:23       ` Ian Campbell
2012-09-06 14:39         ` Pasi Kärkkäinen
2012-09-14  9:05   ` Ian Campbell
2012-09-14 10:19     ` Roger Pau Monne
2012-09-14 10:21       ` Ian Campbell
2012-10-14 11:10     ` [PATCH] libfsimage: add ext4 support for CentOS 5.x / Xen 4.2.1 backport Pasi Kärkkäinen
2012-10-14 11:26       ` Steven Haigh
2012-10-15  7:52       ` Ian Campbell
2012-10-15 13:12         ` Pasi Kärkkäinen

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=504715EE.2070606@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.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 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).