aboutsummaryrefslogtreecommitdiffstats
path: root/fs
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
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')
-rw-r--r--fs/ext4/ext4.h1
-rw-r--r--fs/ext4/super.c20
2 files changed, 6 insertions, 15 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 81014f4ed22d..4dc64ed58d26 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -711,7 +711,6 @@ struct ext4_inode_info {
711#define EXT4_MOUNT_QUOTA 0x80000 /* Some quota option set */ 711#define EXT4_MOUNT_QUOTA 0x80000 /* Some quota option set */
712#define EXT4_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ 712#define EXT4_MOUNT_USRQUOTA 0x100000 /* "old" user quota */
713#define EXT4_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ 713#define EXT4_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */
714#define EXT4_MOUNT_JOURNAL_CHECKSUM 0x800000 /* Journal checksums */
715#define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT 0x1000000 /* Journal Async Commit */ 714#define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT 0x1000000 /* Journal Async Commit */
716#define EXT4_MOUNT_I_VERSION 0x2000000 /* i_version support */ 715#define EXT4_MOUNT_I_VERSION 0x2000000 /* i_version support */
717#define EXT4_MOUNT_DELALLOC 0x8000000 /* Delalloc support */ 716#define EXT4_MOUNT_DELALLOC 0x8000000 /* Delalloc support */
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. */