mke2fs: warn if enabling metadata_csum on a pre-3.18 kernel

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@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
crypto
Darrick J. Wong 2014-10-27 16:32:31 -07:00 committed by Theodore Ts'o
parent 11ca1e9294
commit 210baa5d8a
2 changed files with 9 additions and 0 deletions

View File

@ -2211,6 +2211,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.

View File

@ -18,6 +18,7 @@ s/\\015//g
/^Lifetime writes:/d
/^Maximum mount count:/d
/^Next check after:/d
/^Suggestion:/d
/Reserved blocks uid:/s/ (user .*)//
/Reserved blocks gid:/s/ (group .*)//
/whichever comes first/d