2008-01-23 20:43:41 +00:00
|
|
|
Index: e2fsprogs-1.40.4/e2fsck/super.c
|
|
|
|
===================================================================
|
|
|
|
--- e2fsprogs-1.40.4.orig/e2fsck/super.c
|
|
|
|
+++ e2fsprogs-1.40.4/e2fsck/super.c
|
2008-01-24 22:54:08 +00:00
|
|
|
@@ -814,10 +814,32 @@ int check_backup_super_block(e2fsck_t ct
|
2008-01-23 20:43:41 +00:00
|
|
|
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) \
|
2008-01-24 22:54:08 +00:00
|
|
|
+ (( fs->super->x & ~FEATURE_COMPAT_IGNORE) != \
|
|
|
|
+ (tfs->super->x & ~FEATURE_COMPAT_IGNORE))
|
2008-01-23 20:43:41 +00:00
|
|
|
+#define SUPER_INCOMPAT_DIFFERENT(x) \
|
2008-01-24 22:54:08 +00:00
|
|
|
+ (( fs->super->x & ~FEATURE_INCOMPAT_IGNORE) != \
|
|
|
|
+ (tfs->super->x & ~FEATURE_INCOMPAT_IGNORE))
|
2008-01-23 20:43:41 +00:00
|
|
|
+#define SUPER_RO_COMPAT_DIFFERENT(x) \
|
2008-01-24 22:54:08 +00:00
|
|
|
+ (( fs->super->x & ~FEATURE_RO_COMPAT_IGNORE) != \
|
|
|
|
+ (tfs->super->x & ~FEATURE_RO_COMPAT_IGNORE))
|
2008-01-23 20:43:41 +00:00
|
|
|
+#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,
|