All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: grub-devel@gnu.org
Cc: Javier Martinez Canillas <javierm@redhat.com>,
	Eric Sandeen <esandeen@redhat.com>,
	Lukas Czerner <lczerner@redhat.com>,
	Colin Walters <walters@redhat.com>,
	Dusty Mabe <dustymabe@redhat.com>,
	Jonathan Lebon <jlebon@redhat.com>,
	Peter Jones <pjones@redhat.com>
Subject: [PATCH] fs/ext2: Ignore checksum seed incompat feature support
Date: Fri, 11 Jun 2021 21:36:16 +0200	[thread overview]
Message-ID: <20210611193616.2596290-1-javierm@redhat.com> (raw)

This incompat feature is used to denote that the filesystem stored its
metadata checksum seed in the superblock. This is used to allow tune2fs
to change the UUID on a mounted metadata_csum filesystem without having
to rewrite all the disk metadata.

But GRUB doesn't use the metadata checksum in anyway, so can just ignore
this feature if is enabled. This is consistent with GRUB filesystem code
in general which just does a best effort to access the filesystem's data.

It may be removed from the ignored list in the future if supports to do
metadata checksumming verification is added to the read-only FS driver.

Suggested-by: Eric Sandeen <esandeen@redhat.com>
Suggested-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

 grub-core/fs/ext2.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
index 848bf939dba..238b2d76e38 100644
--- a/grub-core/fs/ext2.c
+++ b/grub-core/fs/ext2.c
@@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
 #define EXT4_FEATURE_INCOMPAT_64BIT		0x0080
 #define EXT4_FEATURE_INCOMPAT_MMP		0x0100
 #define EXT4_FEATURE_INCOMPAT_FLEX_BG		0x0200
+#define EXT4_FEATURE_INCOMPAT_CSUM_SEED		0x2000
 #define EXT4_FEATURE_INCOMPAT_ENCRYPT          0x10000
 
 /* The set of back-incompatible features this driver DOES support. Add (OR)
@@ -123,9 +124,16 @@ GRUB_MOD_LICENSE ("GPLv3+");
  * mmp:            Not really back-incompatible - was added as such to
  *                 avoid multiple read-write mounts. Safe to ignore for this
  *                 RO driver.
+ * checksum seed:  Not really back-incompatible - was added to allow tools
+ *                 such as tune2fs to change the UUID on a mounted metadata
+ *                 checksummed filesystem. Safe to ignore for now since the
+ *                 driver doesn't support checksum verification. But it must
+ *                 be removed from this list if that support is added later.
+ *
  */
 #define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
-				     | EXT4_FEATURE_INCOMPAT_MMP)
+				     | EXT4_FEATURE_INCOMPAT_MMP \
+				     | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
 
 
 #define EXT3_JOURNAL_MAGIC_NUMBER	0xc03b3998U
-- 
2.31.1



             reply	other threads:[~2021-06-11 19:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 19:36 Javier Martinez Canillas [this message]
2021-06-12 13:55 ` [PATCH] fs/ext2: Ignore checksum seed incompat feature support Mihai Moldovan
2021-06-14 13:03 ` Lukas Czerner
2021-07-07 13:22 ` Daniel Kiper
  -- strict thread matches above, loose matches on Subject: below --
2023-08-24 22:08 Stéphane Fontaine
2023-08-24 23:24 ` Vladimir 'phcoder' Serbinenko
2023-08-29 14:09 ` Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210611193616.2596290-1-javierm@redhat.com \
    --to=javierm@redhat.com \
    --cc=dustymabe@redhat.com \
    --cc=esandeen@redhat.com \
    --cc=grub-devel@gnu.org \
    --cc=jlebon@redhat.com \
    --cc=lczerner@redhat.com \
    --cc=pjones@redhat.com \
    --cc=walters@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.