* Tue Nov 10 2009 Eric Sandeen <sandeen@redhat.com> 1.41.9-8

- Fix up topology patch to build w/ new util-linux-ng
- Fix endian swapping of backup journal blocks in sb
This commit is contained in:
Eric Sandeen 2009-11-10 23:23:19 +00:00
parent 521712b595
commit cb2e0f087b
3 changed files with 505 additions and 72 deletions

View File

@ -1,73 +1,3 @@
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 4 Oct 2009 18:45:08 +0000 (-0400)
Subject: Don't use in-tree header files if using system uuid or blkid libraries
X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=e1f085079525c0ed4c5ab1f2abedaf9407a7b8da
Don't use in-tree header files if using system uuid or blkid libraries
This commit forces the use of the system-provided blkid or uuid header
files if we are using the system-provided blkid or uuid libraries.
This avoids using the in-tree header files with the system libraries.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
From: Eric Sandeen <sandeen@redhat.com>
Date: Fri, 2 Oct 2009 16:32:42 +0000 (-0500)
Subject: mke2fs: get device topology values from blkid
X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=9ed8e5fec226aa53634ed95cbeac736d90a518e5
mke2fs: get device topology values from blkid
Handle automatic selection of stride/stripe:
mke2fs 1.41.9 (22-Aug-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=16 blocks, Stripe width=32 blocks
...
And warn on block device misalignment:
mke2fs 1.41.9 (22-Aug-2009)
/dev/sdc1 alignment is offset by 32256 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Proceed anyway? (y,n)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 4 Oct 2009 20:21:13 +0000 (-0400)
Subject: tests: Account for new mke2fs topology information
X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=a321afa8b7baca0ff90e06c1351b2054e61e11ee
tests: Account for new mke2fs topology information
The previous commit adds a new line printed by mke2fs with the
filesystem/device topology information. Update the regression test's
expected output to account for this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
From: Eric Sandeen <sandeen@redhat.com>
Date: Wed, 21 Oct 2009 07:43:02 +0000 (-0400)
Subject: configure.in: Fix typo: remove '2' from blkid_probe_get_topology2
X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=beb736b4c4f949e347c078e014250cd6a61ff33e
configure.in: Fix typo: remove '2' from blkid_probe_get_topology2
I think vim <esc>wq turned into <esc>2wq or something; in any case
blkid_probe_get_topology2 is not the right thing to search for.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
Index: e2fsprogs-1.41.9/debugfs/Makefile.in Index: e2fsprogs-1.41.9/debugfs/Makefile.in
=================================================================== ===================================================================
--- e2fsprogs-1.41.9.orig/debugfs/Makefile.in --- e2fsprogs-1.41.9.orig/debugfs/Makefile.in
@ -563,6 +493,236 @@ Index: e2fsprogs-1.41.9/lib/blkid/Makefile.in
+save.o: $(srcdir)/save.c $(srcdir)/list.h +save.o: $(srcdir)/save.c $(srcdir)/list.h
+tag.o: $(srcdir)/tag.c $(srcdir)/list.h +tag.o: $(srcdir)/tag.c $(srcdir)/list.h
+version.o: $(srcdir)/version.c $(top_srcdir)/version.h +version.o: $(srcdir)/version.c $(top_srcdir)/version.h
Index: e2fsprogs-1.41.9/lib/blkid/blkid.h
===================================================================
--- e2fsprogs-1.41.9.orig/lib/blkid/blkid.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * blkid.h - Interface for libblkid, a library to identify block devices
- *
- * Copyright (C) 2001 Andreas Dilger
- * Copyright (C) 2003 Theodore Ts'o
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the
- * GNU Lesser General Public License.
- * %End-Header%
- */
-
-#ifndef _BLKID_BLKID_H
-#define _BLKID_BLKID_H
-
-#include <sys/types.h>
-#include <blkid/blkid_types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BLKID_VERSION "1.0.0"
-#define BLKID_DATE "12-Feb-2003"
-
-typedef struct blkid_struct_dev *blkid_dev;
-typedef struct blkid_struct_cache *blkid_cache;
-typedef __s64 blkid_loff_t;
-
-typedef struct blkid_struct_tag_iterate *blkid_tag_iterate;
-typedef struct blkid_struct_dev_iterate *blkid_dev_iterate;
-
-/*
- * Flags for blkid_get_dev
- *
- * BLKID_DEV_CREATE Create an empty device structure if not found
- * in the cache.
- * BLKID_DEV_VERIFY Make sure the device structure corresponds
- * with reality.
- * BLKID_DEV_FIND Just look up a device entry, and return NULL
- * if it is not found.
- * BLKID_DEV_NORMAL Get a valid device structure, either from the
- * cache or by probing the device.
- */
-#define BLKID_DEV_FIND 0x0000
-#define BLKID_DEV_CREATE 0x0001
-#define BLKID_DEV_VERIFY 0x0002
-#define BLKID_DEV_NORMAL (BLKID_DEV_CREATE | BLKID_DEV_VERIFY)
-
-/* cache.c */
-extern void blkid_put_cache(blkid_cache cache);
-extern int blkid_get_cache(blkid_cache *cache, const char *filename);
-extern void blkid_gc_cache(blkid_cache cache);
-
-/* dev.c */
-extern const char *blkid_dev_devname(blkid_dev dev);
-
-extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache);
-extern int blkid_dev_set_search(blkid_dev_iterate iter,
- char *search_type, char *search_value);
-extern int blkid_dev_next(blkid_dev_iterate iterate, blkid_dev *dev);
-extern void blkid_dev_iterate_end(blkid_dev_iterate iterate);
-
-/* devno.c */
-extern char *blkid_devno_to_devname(dev_t devno);
-
-/* devname.c */
-extern int blkid_probe_all(blkid_cache cache);
-extern int blkid_probe_all_new(blkid_cache cache);
-extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname,
- int flags);
-
-/* getsize.c */
-extern blkid_loff_t blkid_get_dev_size(int fd);
-
-/* probe.c */
-int blkid_known_fstype(const char *fstype);
-extern blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev);
-
-/* read.c */
-
-/* resolve.c */
-extern char *blkid_get_tag_value(blkid_cache cache, const char *tagname,
- const char *devname);
-extern char *blkid_get_devname(blkid_cache cache, const char *token,
- const char *value);
-
-/* tag.c */
-extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev);
-extern int blkid_tag_next(blkid_tag_iterate iterate,
- const char **type, const char **value);
-extern void blkid_tag_iterate_end(blkid_tag_iterate iterate);
-extern int blkid_dev_has_tag(blkid_dev dev, const char *type,
- const char *value);
-extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache,
- const char *type,
- const char *value);
-extern int blkid_parse_tag_string(const char *token, char **ret_type,
- char **ret_val);
-
-/* version.c */
-extern int blkid_parse_version_string(const char *ver_string);
-extern int blkid_get_library_version(const char **ver_string,
- const char **date_string);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _BLKID_BLKID_H */
Index: e2fsprogs-1.41.9/lib/blkid/blkid.h.in
===================================================================
--- /dev/null
+++ e2fsprogs-1.41.9/lib/blkid/blkid.h.in
@@ -0,0 +1,110 @@
+/*
+ * blkid.h - Interface for libblkid, a library to identify block devices
+ *
+ * Copyright (C) 2001 Andreas Dilger
+ * Copyright (C) 2003 Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ * %End-Header%
+ */
+
+#ifndef _BLKID_BLKID_H
+#define _BLKID_BLKID_H
+
+#include <sys/types.h>
+#include <blkid/blkid_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BLKID_VERSION "1.0.0"
+#define BLKID_DATE "12-Feb-2003"
+
+typedef struct blkid_struct_dev *blkid_dev;
+typedef struct blkid_struct_cache *blkid_cache;
+typedef __s64 blkid_loff_t;
+
+typedef struct blkid_struct_tag_iterate *blkid_tag_iterate;
+typedef struct blkid_struct_dev_iterate *blkid_dev_iterate;
+
+/*
+ * Flags for blkid_get_dev
+ *
+ * BLKID_DEV_CREATE Create an empty device structure if not found
+ * in the cache.
+ * BLKID_DEV_VERIFY Make sure the device structure corresponds
+ * with reality.
+ * BLKID_DEV_FIND Just look up a device entry, and return NULL
+ * if it is not found.
+ * BLKID_DEV_NORMAL Get a valid device structure, either from the
+ * cache or by probing the device.
+ */
+#define BLKID_DEV_FIND 0x0000
+#define BLKID_DEV_CREATE 0x0001
+#define BLKID_DEV_VERIFY 0x0002
+#define BLKID_DEV_NORMAL (BLKID_DEV_CREATE | BLKID_DEV_VERIFY)
+
+/* cache.c */
+extern void blkid_put_cache(blkid_cache cache);
+extern int blkid_get_cache(blkid_cache *cache, const char *filename);
+extern void blkid_gc_cache(blkid_cache cache);
+
+/* dev.c */
+extern const char *blkid_dev_devname(blkid_dev dev);
+
+extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache);
+extern int blkid_dev_set_search(blkid_dev_iterate iter,
+ char *search_type, char *search_value);
+extern int blkid_dev_next(blkid_dev_iterate iterate, blkid_dev *dev);
+extern void blkid_dev_iterate_end(blkid_dev_iterate iterate);
+
+/* devno.c */
+extern char *blkid_devno_to_devname(dev_t devno);
+
+/* devname.c */
+extern int blkid_probe_all(blkid_cache cache);
+extern int blkid_probe_all_new(blkid_cache cache);
+extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname,
+ int flags);
+
+/* getsize.c */
+extern blkid_loff_t blkid_get_dev_size(int fd);
+
+/* probe.c */
+int blkid_known_fstype(const char *fstype);
+extern blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev);
+
+/* read.c */
+
+/* resolve.c */
+extern char *blkid_get_tag_value(blkid_cache cache, const char *tagname,
+ const char *devname);
+extern char *blkid_get_devname(blkid_cache cache, const char *token,
+ const char *value);
+
+/* tag.c */
+extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev);
+extern int blkid_tag_next(blkid_tag_iterate iterate,
+ const char **type, const char **value);
+extern void blkid_tag_iterate_end(blkid_tag_iterate iterate);
+extern int blkid_dev_has_tag(blkid_dev dev, const char *type,
+ const char *value);
+extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache,
+ const char *type,
+ const char *value);
+extern int blkid_parse_tag_string(const char *token, char **ret_type,
+ char **ret_val);
+
+/* version.c */
+extern int blkid_parse_version_string(const char *ver_string);
+extern int blkid_get_library_version(const char **ver_string,
+ const char **date_string);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BLKID_BLKID_H */
Index: e2fsprogs-1.41.9/lib/blkid/version.c Index: e2fsprogs-1.41.9/lib/blkid/version.c
=================================================================== ===================================================================
--- e2fsprogs-1.41.9.orig/lib/blkid/version.c --- e2fsprogs-1.41.9.orig/lib/blkid/version.c
@ -655,6 +815,222 @@ Index: e2fsprogs-1.41.9/lib/uuid/tst_uuid.c
static int test_uuid(const char * uuid, int isValid) static int test_uuid(const char * uuid, int isValid)
{ {
Index: e2fsprogs-1.41.9/lib/uuid/uuid.h
===================================================================
--- e2fsprogs-1.41.9.orig/lib/uuid/uuid.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Public include file for the UUID library
- *
- * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
- *
- * %Begin-Header%
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- * %End-Header%
- */
-
-#ifndef _UUID_UUID_H
-#define _UUID_UUID_H
-
-#include <sys/types.h>
-#ifndef _WIN32
-#include <sys/time.h>
-#endif
-#include <time.h>
-
-typedef unsigned char uuid_t[16];
-
-/* UUID Variant definitions */
-#define UUID_VARIANT_NCS 0
-#define UUID_VARIANT_DCE 1
-#define UUID_VARIANT_MICROSOFT 2
-#define UUID_VARIANT_OTHER 3
-
-/* UUID Type definitions */
-#define UUID_TYPE_DCE_TIME 1
-#define UUID_TYPE_DCE_RANDOM 4
-
-/* Allow UUID constants to be defined */
-#ifdef __GNUC__
-#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
- static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
-#else
-#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
- static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* clear.c */
-void uuid_clear(uuid_t uu);
-
-/* compare.c */
-int uuid_compare(const uuid_t uu1, const uuid_t uu2);
-
-/* copy.c */
-void uuid_copy(uuid_t dst, const uuid_t src);
-
-/* gen_uuid.c */
-void uuid_generate(uuid_t out);
-void uuid_generate_random(uuid_t out);
-void uuid_generate_time(uuid_t out);
-
-/* isnull.c */
-int uuid_is_null(const uuid_t uu);
-
-/* parse.c */
-int uuid_parse(const char *in, uuid_t uu);
-
-/* unparse.c */
-void uuid_unparse(const uuid_t uu, char *out);
-void uuid_unparse_lower(const uuid_t uu, char *out);
-void uuid_unparse_upper(const uuid_t uu, char *out);
-
-/* uuid_time.c */
-time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
-int uuid_type(const uuid_t uu);
-int uuid_variant(const uuid_t uu);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UUID_UUID_H */
Index: e2fsprogs-1.41.9/lib/uuid/uuid.h.in
===================================================================
--- /dev/null
+++ e2fsprogs-1.41.9/lib/uuid/uuid.h.in
@@ -0,0 +1,103 @@
+/*
+ * Public include file for the UUID library
+ *
+ * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUID_H
+#define _UUID_UUID_H
+
+#include <sys/types.h>
+#ifndef _WIN32
+#include <sys/time.h>
+#endif
+#include <time.h>
+
+typedef unsigned char uuid_t[16];
+
+/* UUID Variant definitions */
+#define UUID_VARIANT_NCS 0
+#define UUID_VARIANT_DCE 1
+#define UUID_VARIANT_MICROSOFT 2
+#define UUID_VARIANT_OTHER 3
+
+/* UUID Type definitions */
+#define UUID_TYPE_DCE_TIME 1
+#define UUID_TYPE_DCE_RANDOM 4
+
+/* Allow UUID constants to be defined */
+#ifdef __GNUC__
+#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
+ static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+#else
+#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
+ static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* clear.c */
+void uuid_clear(uuid_t uu);
+
+/* compare.c */
+int uuid_compare(const uuid_t uu1, const uuid_t uu2);
+
+/* copy.c */
+void uuid_copy(uuid_t dst, const uuid_t src);
+
+/* gen_uuid.c */
+void uuid_generate(uuid_t out);
+void uuid_generate_random(uuid_t out);
+void uuid_generate_time(uuid_t out);
+
+/* isnull.c */
+int uuid_is_null(const uuid_t uu);
+
+/* parse.c */
+int uuid_parse(const char *in, uuid_t uu);
+
+/* unparse.c */
+void uuid_unparse(const uuid_t uu, char *out);
+void uuid_unparse_lower(const uuid_t uu, char *out);
+void uuid_unparse_upper(const uuid_t uu, char *out);
+
+/* uuid_time.c */
+time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
+int uuid_type(const uuid_t uu);
+int uuid_variant(const uuid_t uu);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UUID_UUID_H */
Index: e2fsprogs-1.41.9/lib/uuid/uuidP.h Index: e2fsprogs-1.41.9/lib/uuid/uuidP.h
=================================================================== ===================================================================
--- e2fsprogs-1.41.9.orig/lib/uuid/uuidP.h --- e2fsprogs-1.41.9.orig/lib/uuid/uuidP.h

View File

@ -4,7 +4,7 @@
Summary: Utilities for managing ext2, ext3, and ext4 filesystems Summary: Utilities for managing ext2, ext3, and ext4 filesystems
Name: e2fsprogs Name: e2fsprogs
Version: 1.41.9 Version: 1.41.9
Release: 7%{?dist} Release: 8%{?dist}
# License tags based on COPYING file distinctions for various components # License tags based on COPYING file distinctions for various components
License: GPLv2 License: GPLv2
@ -17,6 +17,7 @@ Patch4: e2fsprogs-resize-minimum-fix.patch
Patch5: e2fsprogs-1.41.9-24hr-fsck-grace.patch Patch5: e2fsprogs-1.41.9-24hr-fsck-grace.patch
Patch6: e2fsprogs-1.41.9-topology.patch Patch6: e2fsprogs-1.41.9-topology.patch
Patch7: e2fsprogs-1.41.9-trim.patch Patch7: e2fsprogs-1.41.9-trim.patch
Patch8: e4fsprogs-1.41.9-s_jnl_blocks-swap.patch
Url: http://e2fsprogs.sourceforge.net/ Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -146,6 +147,7 @@ It was originally inspired by the Multics SubSystem library.
%patch5 -p1 -b .24h %patch5 -p1 -b .24h
%patch6 -p1 -b .topo %patch6 -p1 -b .topo
%patch7 -p1 -b .trim %patch7 -p1 -b .trim
%patch8 -p1 -b .journalblocks
%build %build
%configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \ %configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
@ -167,6 +169,9 @@ mv -f %{buildroot}%{_includedir}/ext2fs/ext2_types.h \
install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/ext2fs/ext2_types.h install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/ext2fs/ext2_types.h
%endif %endif
# Hack for now, otherwise strip fails.
chmod +w %{buildroot}%{_libdir}/*.a
%find_lang %{name} %find_lang %{name}
%check %check
@ -306,8 +311,12 @@ exit 0
%{_libdir}/pkgconfig/ss.pc %{_libdir}/pkgconfig/ss.pc
%changelog %changelog
* Tue Nov 10 2009 Eric Sandeen <sandeen@redhat.com> 1.41.9-8
- Fix up topology patch to build w/ new util-linux-ng
- Fix endian swapping of backup journal blocks in sb
* Tue Nov 10 2009 Eric Sandeen <sandeen@redhat.com> 1.41.9-7 * Tue Nov 10 2009 Eric Sandeen <sandeen@redhat.com> 1.41.9-7
- re-enable "make check" during build - Re-enable "make check" during build
* Wed Oct 28 2009 Eric Sandeen <sandeen@redhat.com> 1.41.9-6 * Wed Oct 28 2009 Eric Sandeen <sandeen@redhat.com> 1.41.9-6
- Add support for block discard (TRIM) at mkfs time - Add support for block discard (TRIM) at mkfs time

View File

@ -0,0 +1,48 @@
libext2fs: don't swap extent-based journal backup on read
The f_illitable_flexbg test was failing on ppc, because
e2fsck_move_ext3_journal is doing a direct memcmp of i_block with
s_jnl_blocks, and failing.
This is because we don't swap extent data on read from disk; rather
we do it when we access the extents. However, ext2fs_swap_super
was swapping s_jnl_blocks unconditionally, so these didn't match.
Looks like we need to treat s_jnl_blocks the same as i_block, and
swap it on access, not on read. Except for the last i_size bit...
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
index 42bc01e..38f5f9b 100644
--- a/lib/ext2fs/swapfs.c
+++ b/lib/ext2fs/swapfs.c
@@ -73,9 +73,19 @@ void ext2fs_swap_super(struct ext2_super_block * sb)
sb->s_kbytes_written = ext2fs_swab64(sb->s_kbytes_written);
for (i=0; i < 4; i++)
sb->s_hash_seed[i] = ext2fs_swab32(sb->s_hash_seed[i]);
+
+ /* if journal backup is for a valid extent-based journal... */
+ if (!ext2fs_extent_header_verify(sb->s_jnl_blocks,
+ sizeof(sb->s_jnl_blocks))) {
+ /* ... swap only the journal i_size */
+ sb->s_jnl_blocks[16] = ext2fs_swab32(sb->s_jnl_blocks[16]);
+ /* and the extent data is not swapped on read */
+ return;
+ }
+
+ /* direct/indirect journal: swap it all */
for (i=0; i < 17; i++)
sb->s_jnl_blocks[i] = ext2fs_swab32(sb->s_jnl_blocks[i]);
-
}
void ext2fs_swap_group_desc(struct ext2_group_desc *gdp)
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html