[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141107215257.883.38333.stgit@birch.djwong.org>
Date: Fri, 07 Nov 2014 13:52:57 -0800
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: tytso@....edu, darrick.wong@...cle.com
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 20/47] tune2fs: warn if extents are not enabled when turning
on metadata_csum
Warn the user if we're trying to enable metadata_csum on a FS that
doesn't support extents (since block maps cannot contain checksums).
Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
---
misc/tune2fs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 7fee870..6feaab1 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1113,6 +1113,14 @@ mmp_error:
if (mount_flags & EXT2_MF_MOUNTED)
fputs(_("Cannot enable metadata_csum on a mounted "
"filesystem!\n"), stderr);
+ if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+ EXT3_FEATURE_INCOMPAT_EXTENTS))
+ printf("%s",
+ _("Extents are not enabled. The file extent "
+ "tree can be checksummed, whereas block maps "
+ "cannot. Not enabling extents reduces the "
+ "coverage of metadata checksumming. "
+ "Re-run with -O extent to rectify.\n"));
rewrite_checksums = 1;
/* metadata_csum supersedes uninit_bg */
fs->super->s_feature_ro_compat &=
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists