[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141021010501.21404.59849.stgit@birch.djwong.org>
Date: Mon, 20 Oct 2014 18:05:01 -0700
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: tytso@....edu, darrick.wong@...cle.com
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 1/2] ext4: enable journal checksum if metadata checksum
feature enabled
If metadata checksumming is turned on for the FS, we might as well
enable it for the journal too.
Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
---
fs/ext4/super.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index de38a96..5d51dbf 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3506,6 +3506,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
#ifdef CONFIG_EXT4_FS_POSIX_ACL
set_opt(sb, POSIX_ACL);
#endif
+ /* if metadata_csum, journal_csum is now defaulted on */
+ if (ext4_has_metadata_csum(sb))
+ set_opt(sb, JOURNAL_CHECKSUM);
+
if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_DATA)
set_opt(sb, JOURNAL_DATA);
else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_ORDERED)
--
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