diff options
-rw-r--r-- | Documentation/filesystems/ext4.txt | 8 | ||||
-rw-r--r-- | fs/ext4/ext4.h | 1 | ||||
-rw-r--r-- | fs/ext4/super.c | 20 |
3 files changed, 7 insertions, 22 deletions
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 7be02ac5fa36..3e329dbac785 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -134,15 +134,9 @@ ro Mount filesystem read only. Note that ext4 will | |||
134 | mount options "ro,noload" can be used to prevent | 134 | mount options "ro,noload" can be used to prevent |
135 | writes to the filesystem. | 135 | writes to the filesystem. |
136 | 136 | ||
137 | journal_checksum Enable checksumming of the journal transactions. | ||
138 | This will allow the recovery code in e2fsck and the | ||
139 | kernel to detect corruption in the kernel. It is a | ||
140 | compatible change and will be ignored by older kernels. | ||
141 | |||
142 | journal_async_commit Commit block can be written to disk without waiting | 137 | journal_async_commit Commit block can be written to disk without waiting |
143 | for descriptor blocks. If enabled older kernels cannot | 138 | for descriptor blocks. If enabled older kernels cannot |
144 | mount the device. This will enable 'journal_checksum' | 139 | mount the device. |
145 | internally. | ||
146 | 140 | ||
147 | journal=update Update the ext4 file system's journal to the current | 141 | journal=update Update the ext4 file system's journal to the current |
148 | format. | 142 | format. |
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. */ |