Xen 4.2 (missing) pygrub support for ext4 on rhel5/centos5 e4fsprogs..
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 ?
Thanks,
-- Pasi
Quoted 108 lines · Pasi Kärkkäinen
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.gzAnd 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)
Quoted 6 lines
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
Quoted 11 lines
Thanks,
-- Pasi
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Signature · 2 lines
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com
# 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.
tools/libfsimage/ext2fs-lib/Makefile +1 -1
@@ -4,7 +4,7 @@ LIB_SRCS-y = ext2fs-lib.c FS = ext2fs-lib -FS_LIBDEPS = -lext2fs +FS_LIBDEPS = -lext4fs .PHONY: all all: fs-all
tools/libfsimage/ext2fs-lib/ext2fs-lib.c +1 -1
@@ -22,7 +22,7 @@*/ #include <fsimage_plugin.h> -#include <ext2fs/ext2fs.h> +#include <ext4fs/ext2fs.h> #include <errno.h> #include <inttypes.h>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH 1/1 libfsimage: add ext4 support for CentOS 5.x
In reply to Pasi KärkkäinenCentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if ext4fs/ext2fs.h and -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.
This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
---
Please re-run autogen.sh after applying
--- config/Tools.mk.in | 2 +- tools/config.h.in | 3 +++ tools/configure.ac | 4 ++-- tools/libfsimage/Makefile | 2 +- tools/libfsimage/ext2fs-lib/Makefile | 5 ++++- tools/libfsimage/ext2fs-lib/ext2fs-lib.c | 5 ++++- tools/m4/extfs.m4 | 20 ++++++++++++++++++++ 7 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 tools/m4/extfs.m4
config/Tools.mk.in +1 -1
@@ -56,5 +56,5 @@ CONFIG_SYSTEM_LIBAIO:= @system_aio@ ZLIB := @zlib@ CONFIG_LIBICONV := @libiconv@ CONFIG_GCRYPT := @libgcrypt@ -CONFIG_EXT2FS := @libext2fs@ +EXTFS_LIBS := @EXTFS_LIBS@ CURSES_LIBS := @CURSES_LIBS@
tools/config.h.in +3 -0
@@ -45,6 +45,9 @@ /* libutil header file name */ #undef INCLUDE_LIBUTIL_H +/* e2fs/e4fs header file name */ +#undef INCLUDE_EXTFS_H + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT
tools/configure.ac +2 -2
@@ -35,6 +35,7 @@ m4_include([m4/pkg.m4]) m4_include([m4/curses.m4]) m4_include([m4/pthread.m4]) m4_include([m4/ptyfuncs.m4]) +m4_include([m4/extfs.m4]) # Enable/disable options AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
@@ -138,8 +139,7 @@ AC_SUBST(zlib) AC_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"]) AC_SUBST(system_aio) AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) -AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"]) -AC_SUBST(libext2fs) +AX_CHECK_EXTFS AC_CHECK_LIB([gcrypt], [gcry_md_hash_buffer], [libgcrypt="y"], [libgcrypt="n"]) AC_SUBST(libgcrypt) AX_CHECK_PTHREAD
tools/libfsimage/Makefile +1 -1
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk SUBDIRS-y = common ufs reiserfs iso9660 fat zfs SUBDIRS-$(CONFIG_X86) += xfs -ifeq ($(CONFIG_EXT2FS), y) +ifneq ($(EXTFS_LIBS), ) SUBDIRS-y += ext2fs-lib else SUBDIRS-y += ext2fs
tools/libfsimage/ext2fs-lib/Makefile +4 -1
@@ -4,7 +4,10 @@ LIB_SRCS-y = ext2fs-lib.c FS = ext2fs-lib -FS_LIBDEPS = -lext2fs +FS_LIBDEPS = $(EXTFS_LIBS) + +# Include configure output (config.h) to headers search path +CFLAGS += -I$(XEN_ROOT)/tools .PHONY: all all: fs-all
tools/libfsimage/ext2fs-lib/ext2fs-lib.c +4 -1
@@ -21,8 +21,11 @@* Use is subject to license terms. */ +/* Include output from configure */ +#include <config.h> +#include <fsimage_plugin.h> -#include <ext2fs/ext2fs.h> +#include INCLUDE_EXTFS_H #include <errno.h> #include <inttypes.h>
tools/m4/extfs.m4 new file +20 -0
@@ -0,0 +1,20 @@ +AC_DEFUN([AX_CHECK_EXTFS], [ +AC_CHECK_HEADER([ext2fs/ext2fs.h], [ +AC_CHECK_LIB([ext2fs], [ext2fs_open2], [ + AC_DEFINE([INCLUDE_EXTFS_H], [<ext2fs/ext2fs.h>], + [Define extfs header to use]) + EXTFS_LIBS="-lext2fs" +]) +]) +dnl This is a temporary hack for CentOS 5.x, which split the ext4 support +dnl of ext2fs in a different package. Once CentOS 5.x is no longer supported +dnl we can remove this. +AC_CHECK_HEADER([ext4fs/ext2fs.h], [ +AC_CHECK_LIB([ext4fs], [ext2fs_open2], [ + AC_DEFINE([INCLUDE_EXTFS_H], [<ext4fs/ext2fs.h>], + [Define extfs header to use]) + EXTFS_LIBS="-lext4fs" +]) +]) +AC_SUBST(EXTFS_LIBS) +])
Signature · 1 line
1.7.7.5 (Apple Git-26)
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x
Quoted 10 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>
Thanks.
Any patch which is intended for 4.2 at this stage needs to come with some rationale as to why it is acceptable at this late stage.
Therefore unless someone can argue convincingly for it this is 4.3 material.
Ian.
Quoted 132 lines
---
Please re-runautogen.shafter applying--- config/Tools.mk.in | 2 +- tools/config.h.in | 3 +++ tools/configure.ac | 4 ++-- tools/libfsimage/Makefile | 2 +- tools/libfsimage/ext2fs-lib/Makefile | 5 ++++- tools/libfsimage/ext2fs-lib/ext2fs-lib.c | 5 ++++- tools/m4/extfs.m4 | 20 ++++++++++++++++++++ 7 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 tools/m4/extfs.m4config/Tools.mk.in +1
-1@@ -56,5 +56,5 @@ CONFIG_SYSTEM_LIBAIO:= @system_aio@ ZLIB := @zlib@ CONFIG_LIBICONV := @libiconv@ CONFIG_GCRYPT := @libgcrypt@ -CONFIG_EXT2FS := @libext2fs@ +EXTFS_LIBS := @EXTFS_LIBS@ CURSES_LIBS := @CURSES_LIBS@tools/config.h.in +3
-0@@ -45,6 +45,9 @@ /* libutil header file name */ #undef INCLUDE_LIBUTIL_H +/* e2fs/e4fs header file name */ +#undef INCLUDE_EXTFS_H + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORTtools/configure.ac +2
-2@@ -35,6 +35,7 @@ m4_include([m4/pkg.m4]) m4_include([m4/curses.m4]) m4_include([m4/pthread.m4]) m4_include([m4/ptyfuncs.m4]) +m4_include([m4/extfs.m4]) # Enable/disable options AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])@@ -138,8 +139,7 @@ AC_SUBST(zlib) AC_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"]) AC_SUBST(system_aio) AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) -AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"]) -AC_SUBST(libext2fs) +AX_CHECK_EXTFS AC_CHECK_LIB([gcrypt], [gcry_md_hash_buffer], [libgcrypt="y"], [libgcrypt="n"]) AC_SUBST(libgcrypt) AX_CHECK_PTHREADtools/libfsimage/Makefile +1
-1@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk SUBDIRS-y = common ufs reiserfs iso9660 fat zfs SUBDIRS-$(CONFIG_X86) += xfs -ifeq ($(CONFIG_EXT2FS), y) +ifneq ($(EXTFS_LIBS), ) SUBDIRS-y += ext2fs-lib else SUBDIRS-y += ext2fstools/libfsimage/ext2fs-lib/Makefile +4
-1@@ -4,7 +4,10 @@ LIB_SRCS-y = ext2fs-lib.c FS = ext2fs-lib -FS_LIBDEPS = -lext2fs +FS_LIBDEPS = $(EXTFS_LIBS) + +# Include configure output (config.h) to headers search path +CFLAGS += -I$(XEN_ROOT)/tools .PHONY: all all: fs-alltools/libfsimage/ext2fs-lib/ext2fs-lib.c +4
-1@@ -21,8 +21,11 @@* Use is subject to license terms. */ +/* Include output from configure */ +#include <config.h> +#include <fsimage_plugin.h> -#include <ext2fs/ext2fs.h> +#include INCLUDE_EXTFS_H #include <errno.h> #include <inttypes.h> tools/m4/extfs.m4 new file +20
-0@@ -0,0 +1,20 @@ +AC_DEFUN([AX_CHECK_EXTFS], [ +AC_CHECK_HEADER([ext2fs/ext2fs.h], [ +AC_CHECK_LIB([ext2fs], [ext2fs_open2], [ + AC_DEFINE([INCLUDE_EXTFS_H], [<ext2fs/ext2fs.h>], + [Define extfs header to use]) + EXTFS_LIBS="-lext2fs" +]) +]) +dnl This is a temporary hack for CentOS 5.x, which split the ext4 support +dnl of ext2fs in a different package. Once CentOS 5.x is no longer supported +dnl we can remove this. +AC_CHECK_HEADER([ext4fs/ext2fs.h], [ +AC_CHECK_LIB([ext4fs], [ext2fs_open2], [ + AC_DEFINE([INCLUDE_EXTFS_H], [<ext4fs/ext2fs.h>], + [Define extfs header to use]) + EXTFS_LIBS="-lext4fs" +]) +]) +AC_SUBST(EXTFS_LIBS) +])
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x
Quoted 10 lines · Ian Campbell
Quoted 9 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Quoted 7 lines
Quoted 1 line
Signed-off-by Roger Pau Monne <[email protected]>Thanks.
Any patch which is intended for 4.2 at this stage needs to come with some rationale as to why it is acceptable at this late stage.
rhel5/centos5 has a lot of Xen users, so it'd be nice if those people could build Xen 4.2 from sources and still have pygrub ext4 support.
(the stock redhat el5 Xen 3.1.2 rpms have similar tweaks and they do provide pygrub ext4 support out-of-the-box on el5).
Also XenServer/XCP has hacks to get pygrub ext4 support enabled in similar way, so it'd make sense to fix/workaround this properly in Xen upstream.
Quoted 3 lines
Therefore unless someone can argue convincingly for it this is 4.3 material.
I'm not expecting that was convincing enough :) so if not 4.2.0 then 4.3 and 4.2.1 ?
-- Pasi
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x
Quoted 13 lines · Pasi Kärkkäinen
Quoted 12 lines · Ian Campbell
Quoted 10 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>
Quoted 8 lines
Quoted 5 lines
Thanks.
Any patch which is intended for 4.2 at this stage needs to come with some rationale as to why it is acceptable at this late stage.
rhel5/centos5 has a lot of Xen users, so it'd be nice if those people could build Xen 4.2 from sources and still have pygrub ext4 support.
I'm sorry but two days (now one day) before the final RC we need more justification than "it would be nice".
Who are these people? How many of them are there? Why are they doing this? If you are building from source what reason is there to be using RHEL5?
We certainly don't seem to be getting bugs reports (either on -devel@ or -users@) about this problem.
Quoted 5 lines
(the stock redhat el5 Xen 3.1.2 rpms have similar tweaks and they do provide pygrub ext4 support out-of-the-box on el5).
Also XenServer/XCP has hacks to get pygrub ext4 support enabled in similar way, so it'd make sense to fix/workaround this properly in Xen upstream.
This seems right and proper to me and isn't an argument for us taking and carry this hack in our tree.
IMHO the presence of libe4fs in RHEL5 is a distro specific packaging hack and it is appropriate that the fallout be dealt with via RHEL5 specific packaging hacks.
Quoted 5 lines
Quoted 3 lines
Therefore unless someone can argue convincingly for it this is 4.3 material.
I'm not expecting that was convincing enough :) so if not 4.2.0 then 4.3 and 4.2.1 ?
Perhaps. I'm not entirely convinced of the need at all though. If RHEL5 was the current release then maybe, but RHEL6 is nearly two years old at this point.
Ian.
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x
Quoted 20 lines · Ian Campbell
Quoted 19 lines · Pasi Kärkkäinen
Quoted 17 lines · Ian Campbell
Quoted 10 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>Thanks.
Any patch which is intended for 4.2 at this stage needs to come with some rationale as to why it is acceptable at this late stage.
Quoted 6 lines
Quoted 2 lines
rhel5/centos5 has a lot of Xen users, so it'd be nice if those people could build Xen 4.2 from sources and still have pygrub ext4 support.
I'm sorry but two days (now one day) before the final RC we need more justification than "it would be nice".
I understand that.
Quoted 7 lines
Who are these people? How many of them are there? Why are they doing this? If you are building from source what reason is there to be using RHEL5?
We certainly don't seem to be getting bugs reports (either on -devel@ or -users@) about this problem.
Ok, so it'd be mostly *CentOS5* users, who don't have the support contracts anyway. I'm not able to give you any numbers. I hit this issue myself,
so I thought it'd be nice to get it fixed in upstream Xen aswell.
Quoted 6 lines
Quoted 5 lines
(the stock redhat el5 Xen 3.1.2 rpms have similar tweaks and they do provide pygrub ext4 support out-of-the-box on el5).
Also XenServer/XCP has hacks to get pygrub ext4 support enabled in similar way, so it'd make sense to fix/workaround this properly in Xen upstream.
Quoted 7 lines
This seems right and proper to me and isn't an argument for us taking and carry this hack in our tree.
IMHO the presence of libe4fs in RHEL5 is a distro specific packaging hack and it is appropriate that the fallout be dealt with via RHEL5 specific packaging hacks.
The patch that Roger submitted is dealing with this in a nice way though.. Or was there something wrong with the patch?
Quoted 10 lines
Quoted 5 lines
Quoted 3 lines
Therefore unless someone can argue convincingly for it this is 4.3 material.
I'm not expecting that was convincing enough :) so if not 4.2.0 then 4.3 and 4.2.1 ?
Perhaps. I'm not entirely convinced of the need at all though. If RHEL5 was the current release then maybe, but RHEL6 is nearly two years old at this point.
RHEL5 has "Production Phase" support until 2017. It's still getting improvements and new features in 5.x point releases, and still keeping the ABI stable and compatible with earlier 5.x versions;
that's why the e4fs stuff exists in the first place - to not break the ABI.
Next year it'll transform into "security maintenance and minor fixes"-mode.
-- Pasi
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x
In reply to Roger Pau MonneQuoted 6 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.
Quoted 6 lines
This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>---
Please re-runautogen.shafter applying
Done & acked + applied. Thanks.
tools/libfsimage/ext2fs-lib/Makefile LIB_SRCS-y = ext2fs-lib.c · line 10
Quoted 13 lines
tools/libfsimage/ext2fs-lib/Makefile +4
-1@@ -4,7 +4,10 @@ LIB_SRCS-y = ext2fs-lib.c FS = ext2fs-lib -FS_LIBDEPS = -lext2fs +FS_LIBDEPS = $(EXTFS_LIBS) + +# Include configure output (config.h) to headers search path +CFLAGS += -I$(XEN_ROOT)/tools
Is there any way to move config.h from tools to under tools/include somewhere?
Quoted 46 lines
tools/libfsimage/ext2fs-lib/Makefile +0
-0.PHONY: all all: fs-alltools/libfsimage/ext2fs-lib/ext2fs-lib.c +4
-1@@ -21,8 +21,11 @@* Use is subject to license terms. */ +/* Include output from configure */ +#include <config.h> +#include <fsimage_plugin.h> -#include <ext2fs/ext2fs.h> +#include INCLUDE_EXTFS_H #include <errno.h> #include <inttypes.h> tools/m4/extfs.m4 new file +20
-0@@ -0,0 +1,20 @@ +AC_DEFUN([AX_CHECK_EXTFS], [ +AC_CHECK_HEADER([ext2fs/ext2fs.h], [ +AC_CHECK_LIB([ext2fs], [ext2fs_open2], [ + AC_DEFINE([INCLUDE_EXTFS_H], [<ext2fs/ext2fs.h>], + [Define extfs header to use]) + EXTFS_LIBS="-lext2fs" +]) +]) +dnl This is a temporary hack for CentOS 5.x, which split the ext4 support +dnl of ext2fs in a different package. Once CentOS 5.x is no longer supported +dnl we can remove this. +AC_CHECK_HEADER([ext4fs/ext2fs.h], [ +AC_CHECK_LIB([ext4fs], [ext2fs_open2], [ + AC_DEFINE([INCLUDE_EXTFS_H], [<ext4fs/ext2fs.h>], + [Define extfs header to use]) + EXTFS_LIBS="-lext4fs" +]) +]) +AC_SUBST(EXTFS_LIBS) +])
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x
Quoted 24 lines · Ian Campbell
Quoted 6 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.Quoted 6 lines
This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>---
Please re-runautogen.shafter applyingDone & acked + applied. Thanks.
Quoted 8 lines
tools/libfsimage/ext2fs-lib/Makefile +0
-0@@ -4,7 +4,10 @@ LIB_SRCS-y = ext2fs-lib.c FS = ext2fs-lib
Quoted 8 lines
tools/libfsimage/ext2fs-lib/Makefile LIB_SRCS-y = ext2fs-lib.c · line 10
Quoted 5 lines
tools/libfsimage/ext2fs-lib/Makefile +4
-1-FS_LIBDEPS = -lext2fs +FS_LIBDEPS = $(EXTFS_LIBS) + +# Include configure output (config.h) to headers search path +CFLAGS += -I$(XEN_ROOT)/toolsIs there any way to move
config.hfrom tools to undertools/includesomewhere?
Yes, but config.h should then be renamed to xen_config.h or something different from config.h, since a lot of utilities we pack with Xen include their own config.h and also include the tools/include folder, so we might have a collision there.
If renaming it to xen_config.h is fine I will send a patch.
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x
Quoted 34 lines · Roger Pau Monne
Quoted 24 lines · Ian Campbell
Quoted 6 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.Quoted 6 lines
This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>---
Please re-runautogen.shafter applyingDone & acked + applied. Thanks.
Quoted 8 lines
tools/libfsimage/ext2fs-lib/Makefile +0
-0@@ -4,7 +4,10 @@ LIB_SRCS-y = ext2fs-lib.c FS = ext2fs-libQuoted 8 lines
tools/libfsimage/ext2fs-lib/Makefile LIB_SRCS-y = ext2fs-lib.c · line 10
Quoted 5 lines
tools/libfsimage/ext2fs-lib/Makefile +4
-1-FS_LIBDEPS = -lext2fs +FS_LIBDEPS = $(EXTFS_LIBS) + +# Include configure output (config.h) to headers search path +CFLAGS += -I$(XEN_ROOT)/toolsIs there any way to move
config.hfrom tools to undertools/includesomewhere?
Quoted 6 lines
Yes, but
config.hshould then be renamed toxen_config.hor something different fromconfig.h, since a lot of utilities we pack with Xen include their ownconfig.hand also include thetools/includefolder, so we might have a collision there.If renaming it to
xen_config.his fine I will send a patch.
I was imagining it would go in one of the subdirs but none of them really look suitable, so xen_config.h is fine IMHO.
Might want to see what Ian J thinks first?
Ian.
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x / Xen 4.2.1 backport
In reply to Ian CampbellQuoted 7 lines · Ian Campbell
Quoted 6 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.
Quoted 9 lines
Quoted 6 lines
This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>---
Please re-runautogen.shafter applyingDone & acked + applied. Thanks.
Hello,
Now that this patch has been in xen-unstable for a while I'd like to request Xen 4.2.1 backport..
Thanks,
-- Pasi
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x / Xen 4.2.1 backport
Quoted 15 lines · Pasi Kärkkäinen
Quoted 14 lines · Ian Campbell
Quoted 12 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>---
Please re-runautogen.shafter applying
Quoted 7 lines
Quoted 2 lines
Done & acked + applied. Thanks.
Hello,
Now that this patch has been in xen-unstable for a while I'd like to request Xen 4.2.1 backport..
I agree. I've been slamming my head against a wall trying to package 4.2.0 for CentOS 5 for a few days now. Its kinda working, but not really. Having some fixes like this may end up making a few headaches I'm having go away...
Signature · 6 lines
Steven Haigh Email: [email protected] Web: http://www.crc.id.au Phone: (03) 9001 6090 - 0412 935 897 Fax: (03) 8338 0299
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x / Xen 4.2.1 backport
In reply to Pasi KärkkäinenQuoted 15 lines · Pasi Kärkkäinen
Quoted 14 lines · Ian Campbell
Quoted 12 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>---
Please re-runautogen.shafter applying
Quoted 7 lines
Quoted 2 lines
Done & acked + applied. Thanks.
Hello,
Now that this patch has been in xen-unstable for a while I'd like to request Xen 4.2.1 backport..
Ian Jackson deals with backports, not me.
Ian.
Re: [PATCH] libfsimage: add ext4 support for CentOS 5.x / Xen 4.2.1 backport
Quoted 19 lines · Ian Campbell
Quoted 18 lines · Pasi Kärkkäinen
Quoted 16 lines · Ian Campbell
Quoted 6 lines · Roger Pau Monne
CentOS 5.x forked e2fs ext4 support into a different package called e4fs, and so headers and library names changed from ext2fs to ext4fs. Check if
ext4fs/ext2fs.hand -lext4fs work, and use that instead of ext2fs to build libfsimage. This patch assumes that if the ext4fs library is present it should always be used instead of ext2fs.Quoted 6 lines
This patch includes a rework of the ext2fs check, a new ext4fs check and a minor modification in libfsimage to use the correct library.
Signed-off-by Roger Pau Monne <[email protected]>---
Please re-runautogen.shafter applyingDone & acked + applied. Thanks.
Quoted 7 lines
Quoted 4 lines
Hello,
Now that this patch has been in xen-unstable for a while I'd like to request Xen 4.2.1 backport..
Ian Jackson deals with backports, not me.
Added IanJ to CC list..
-- Pasi