Blame SOURCES/0208-fs-ext2-Ignore-checksum-seed-incompat-feature.patch

8e15ce
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8e15ce
From: Javier Martinez Canillas <javierm@redhat.com>
8e15ce
Date: Fri, 11 Jun 2021 00:01:29 +0200
8e15ce
Subject: [PATCH] fs/ext2: Ignore checksum seed incompat feature
8e15ce
8e15ce
This incompat feature is used to denote that the filesystem stored its
8e15ce
metadata checksum seed in the superblock. This is used to allow tune2fs
8e15ce
to change the UUID on a mounted metadata_csum filesystem without having
8e15ce
to rewrite all the disk metadata.
8e15ce
8e15ce
But GRUB doesn't use the metadata checksum in anyway, so can just ignore
8e15ce
this feature if is enabled. This is consistent with GRUB filesystem code
8e15ce
in general which just does a best effort to access the filesystem's data.
8e15ce
8e15ce
It may be removed from the ignored list in the future if supports to do
8e15ce
metadata checksumming verification is added to the read-only FS driver.
8e15ce
8e15ce
Suggested-by: Eric Sandeen <esandeen@redhat.com>
8e15ce
Suggested-by: Lukas Czerner <lczerner@redhat.com>
8e15ce
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
8e15ce
---
8e15ce
 grub-core/fs/ext2.c | 10 +++++++++-
8e15ce
 1 file changed, 9 insertions(+), 1 deletion(-)
8e15ce
8e15ce
diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
8e15ce
index e7dd78e6635..731d346f886 100644
8e15ce
--- a/grub-core/fs/ext2.c
8e15ce
+++ b/grub-core/fs/ext2.c
8e15ce
@@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
8e15ce
 #define EXT4_FEATURE_INCOMPAT_64BIT		0x0080
8e15ce
 #define EXT4_FEATURE_INCOMPAT_MMP		0x0100
8e15ce
 #define EXT4_FEATURE_INCOMPAT_FLEX_BG		0x0200
8e15ce
+#define EXT4_FEATURE_INCOMPAT_CSUM_SEED		0x2000
8e15ce
 #define EXT4_FEATURE_INCOMPAT_ENCRYPT          0x10000
8e15ce
 
8e15ce
 /* The set of back-incompatible features this driver DOES support. Add (OR)
8e15ce
@@ -123,9 +124,16 @@ GRUB_MOD_LICENSE ("GPLv3+");
8e15ce
  * mmp:            Not really back-incompatible - was added as such to
8e15ce
  *                 avoid multiple read-write mounts. Safe to ignore for this
8e15ce
  *                 RO driver.
8e15ce
+ * checksum seed:  Not really back-incompatible - was added to allow tools
8e15ce
+ *                 such as tune2fs to change the UUID on a mounted metadata
8e15ce
+ *                 checksummed filesystem. Safe to ignore for now since the
8e15ce
+ *                 driver doesn't support checksum verification. But it must
8e15ce
+ *                 be removed from this list if that support is added later.
8e15ce
+ *
8e15ce
  */
8e15ce
 #define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
8e15ce
-				     | EXT4_FEATURE_INCOMPAT_MMP)
8e15ce
+				     | EXT4_FEATURE_INCOMPAT_MMP \
8e15ce
+				     | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
8e15ce
 
8e15ce
 
8e15ce
 #define EXT3_JOURNAL_MAGIC_NUMBER	0xc03b3998U