* Wed Jan 23 2008 Eric Sandeen <sandeen@redhat.com> 1.40.4-5

- ignore some primary/backup superblock flag differences (#428893)
- teach libblkid about ext4dev
This commit is contained in:
Eric Sandeen 2008-01-23 20:43:41 +00:00
parent 6821c0b99d
commit dba7ad2f7f
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,38 @@
Index: e2fsprogs-1.40.4/e2fsck/super.c
===================================================================
--- e2fsprogs-1.40.4.orig/e2fsck/super.c
+++ e2fsprogs-1.40.4/e2fsck/super.c
@@ -814,10 +814,29 @@ int check_backup_super_block(e2fsck_t ct
continue;
}
-#define SUPER_DIFFERENT(x) (fs->super->x != tfs->super->x)
- if (SUPER_DIFFERENT(s_feature_compat) ||
- SUPER_DIFFERENT(s_feature_incompat) ||
- SUPER_DIFFERENT(s_feature_ro_compat) ||
+ /*
+ * A few flags are set on the fly by the kernel, but
+ * only in the primary superblock. They are safe
+ * to copy even if they differ.
+ */
+
+#define FEATURE_COMPAT_IGNORE (EXT2_FEATURE_COMPAT_EXT_ATTR)
+#define FEATURE_RO_COMPAT_IGNORE (EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK)
+#define FEATURE_INCOMPAT_IGNORE (EXT3_FEATURE_INCOMPAT_EXTENTS)
+
+#define SUPER_COMPAT_DIFFERENT(x) \
+ ((fs->super->x & ~FEATURE_COMPAT_IGNORE) != tfs->super->x)
+#define SUPER_INCOMPAT_DIFFERENT(x) \
+ ((fs->super->x & ~FEATURE_INCOMPAT_IGNORE) != tfs->super->x)
+#define SUPER_RO_COMPAT_DIFFERENT(x) \
+ ((fs->super->x & ~FEATURE_RO_COMPAT_IGNORE) != tfs->super->x)
+#define SUPER_DIFFERENT(x) \
+ (fs->super->x != tfs->super->x)
+
+ if (SUPER_COMPAT_DIFFERENT(s_feature_compat) ||
+ SUPER_INCOMPAT_DIFFERENT(s_feature_incompat) ||
+ SUPER_RO_COMPAT_DIFFERENT(s_feature_ro_compat) ||
SUPER_DIFFERENT(s_blocks_count) ||
SUPER_DIFFERENT(s_inodes_count) ||
memcmp(fs->super->s_uuid, tfs->super->s_uuid,

View File

@ -4,7 +4,7 @@
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
Name: e2fsprogs
Version: 1.40.4
Release: 4%{?dist}
Release: 5%{?dist}
# License based on upstream-modified COPYING file,
# which clearly states "V2" intent.
License: GPLv2
@ -17,6 +17,8 @@ Patch1: e2fsprogs-1.39-blkid-devmapper.patch
Patch2: e2fsprogs-1.38-etcblkid.patch
Patch3: e2fsprogs-1.39-mkinstalldirs.patch
Patch4: e2fsprogs-1.40.4-uuidd-tidy.patch
Patch5: e2fsprogs-1.40.4-sb_feature_check_ignore.patch
Patch6: e2fsprogs-1.40.4-blkid-ext4dev.patch
Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -96,6 +98,10 @@ SMP systems.
%patch3 -p1 -b .mkinstalldirs
# uuidd manpage tidyup
%patch4 -p1 -b .uuidd-tidy
# ignore some flag differences on primary/backup sb feature checks
%patch5 -p1 -b .featurecheck
# teach blkid about ext4dev, for now
%patch6 -p1 -b .ext4-blkid
%build
aclocal
@ -285,6 +291,10 @@ fi
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
%changelog
* Wed Jan 23 2008 Eric Sandeen <sandeen@redhat.com> 1.40.4-5
- ignore some primary/backup superblock flag differences (#428893)
- teach libblkid about ext4dev
* Mon Jan 10 2008 Eric Sandeen <sandeen@redhat.com> 1.40.4-4
- Build e2fsck as a dynamically linked binary.
- Re-fix uidd manpage default paths.