aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-09-05 12:50:43 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-09-05 12:50:43 -0400
commitd0646f7b636d067d715fab52a2ba9c6f0f46b0d7 (patch)
treef7b3ae9510e8c789651d99fee0c22867e6ccba94 /fs/ext4/super.c
parenta3710fd1ee8cd542c5de63cf2c39f8912031f867 (diff)
ext4: Remove journal_checksum mount option and enable it by default
There's no real cost for the journal checksum feature, and we should make sure it is enabled all the time. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4037fe0b5a5c..f1815d3bcfd5 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1280,11 +1280,9 @@ static int parse_options(char *options, struct super_block *sb,
1280 *journal_devnum = option; 1280 *journal_devnum = option;
1281 break; 1281 break;
1282 case Opt_journal_checksum: 1282 case Opt_journal_checksum:
1283 set_opt(sbi->s_mount_opt, JOURNAL_CHECKSUM); 1283 break; /* Kept for backwards compatibility */
1284 break;
1285 case Opt_journal_async_commit: 1284 case Opt_journal_async_commit:
1286 set_opt(sbi->s_mount_opt, JOURNAL_ASYNC_COMMIT); 1285 set_opt(sbi->s_mount_opt, JOURNAL_ASYNC_COMMIT);
1287 set_opt(sbi->s_mount_opt, JOURNAL_CHECKSUM);
1288 break; 1286 break;
1289 case Opt_noload: 1287 case Opt_noload:
1290 set_opt(sbi->s_mount_opt, NOLOAD); 1288 set_opt(sbi->s_mount_opt, NOLOAD);
@@ -2751,20 +2749,14 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
2751 goto failed_mount4; 2749 goto failed_mount4;
2752 } 2750 }
2753 2751
2754 if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) { 2752 jbd2_journal_set_features(sbi->s_journal,
2755 jbd2_journal_set_features(sbi->s_journal, 2753 JBD2_FEATURE_COMPAT_CHECKSUM, 0, 0);
2756 JBD2_FEATURE_COMPAT_CHECKSUM, 0, 2754 if (test_opt(sb, JOURNAL_ASYNC_COMMIT))
2755 jbd2_journal_set_features(sbi->s_journal, 0, 0,
2757 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT); 2756 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT);
2758 } else if (test_opt(sb, JOURNAL_CHECKSUM)) { 2757 else
2759 jbd2_journal_set_features(sbi->s_journal,
2760 JBD2_FEATURE_COMPAT_CHECKSUM, 0, 0);
2761 jbd2_journal_clear_features(sbi->s_journal, 0, 0, 2758 jbd2_journal_clear_features(sbi->s_journal, 0, 0,
2762 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT); 2759 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT);
2763 } else {
2764 jbd2_journal_clear_features(sbi->s_journal,
2765 JBD2_FEATURE_COMPAT_CHECKSUM, 0,
2766 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT);
2767 }
2768 2760
2769 /* We have now updated the journal if required, so we can 2761 /* We have now updated the journal if required, so we can
2770 * validate the data journaling mode. */ 2762 * validate the data journaling mode. */