]> git.proxmox.com Git - grub2.git/blob - debian/patches/ignore_checksum_seed_incompat_feature.patch
Ignore some new ext2 flags to stay compatible with latest mke2fs
[grub2.git] / debian / patches / ignore_checksum_seed_incompat_feature.patch
1 commit 7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763
2 Author: Javier Martinez Canillas <javierm@redhat.com>
3 Date: Fri Jun 11 21:36:16 2021 +0200
4
5 fs/ext2: Ignore checksum seed incompat feature
6
7 This incompat feature is used to denote that the filesystem stored its
8 metadata checksum seed in the superblock. This is used to allow tune2fs
9 changing the UUID on a mounted metdata_csum filesystem without having
10 to rewrite all the disk metadata. However, the GRUB doesn't use the
11 metadata checksum at all. So, it can just ignore this feature if it
12 is enabled. This is consistent with the GRUB filesystem code in general
13 which just does a best effort to access the filesystem's data.
14
15 The checksum seed incompat feature has to be removed from the ignore
16 list if the support for metadata checksum verification is added to the
17 GRUB ext2 driver later.
18
19 Suggested-by: Eric Sandeen <esandeen@redhat.com>
20 Suggested-by: Lukas Czerner <lczerner@redhat.com>
21 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
22 Reviewed-by: Lukas Czerner <lczerner@redhat.com>
23 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
24
25 diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
26 index e7dd78e66..4953a1591 100644
27 --- a/grub-core/fs/ext2.c
28 +++ b/grub-core/fs/ext2.c
29 @@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
30 #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
31 #define EXT4_FEATURE_INCOMPAT_MMP 0x0100
32 #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
33 +#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000
34 #define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
35
36 /* The set of back-incompatible features this driver DOES support. Add (OR)
37 @@ -123,10 +124,15 @@ GRUB_MOD_LICENSE ("GPLv3+");
38 * mmp: Not really back-incompatible - was added as such to
39 * avoid multiple read-write mounts. Safe to ignore for this
40 * RO driver.
41 + * checksum seed: Not really back-incompatible - was added to allow tools
42 + * such as tune2fs to change the UUID on a mounted metadata
43 + * checksummed filesystem. Safe to ignore for now since the
44 + * driver doesn't support checksum verification. However, it
45 + * has to be removed from this list if the support is added later.
46 */
47 #define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
48 - | EXT4_FEATURE_INCOMPAT_MMP)
49 -
50 + | EXT4_FEATURE_INCOMPAT_MMP \
51 + | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
52
53 #define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U
54