[PATCH 41/39] mke2fs: warn if enabling metadata_csum on a pre-3.18 kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The metadata_csum feature (really, the journal checksum disk format)
didn't stabilize until the 3.18 kernel, at which point the companion
journal_csum feature was turned on by default if metadata_csum was
enabled.  Therefore, warn the user if they try to create such a
filesystem on a pre-3.18 kernel.

Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
 misc/mke2fs.c    |    8 ++++++++
 tests/filter.sed |    1 +
 2 files changed, 9 insertions(+)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 149330c..aeb852f 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -2213,6 +2213,14 @@ profile_error:
 			blocksize, sys_page_size);
 	}
 
+	/* Metadata checksumming wasn't totally stable before 3.18. */
+	if (is_before_linux_ver(3, 18, 0) &&
+	    (fs_param.s_feature_ro_compat &
+					EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
+		fprintf(stderr, _("Suggestion: Use Linux kernel >= 3.18 for "
+			"improved stability of the metadata and journal "
+			"checksum features.\n"));
+
 	/*
 	 * On newer kernels we do have lazy_itable_init support. So pick the
 	 * right default in case ext4 module is not loaded.
diff --git a/tests/filter.sed b/tests/filter.sed
index d9a336c..d07e9b8 100644
--- a/tests/filter.sed
+++ b/tests/filter.sed
@@ -23,3 +23,4 @@ s/\\015//g
 /whichever comes first/d
 s/, csum 0x\([0-9a-f]*\)//g
 s/ csum 0x\([0-9a-f]*\)//g
+/^Suggestion:/d
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux