1 commit a70b020e5b2f1bbe3b759232852beaac4f0852b5
2 Author: Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com>
3 AuthorDate: Fri Nov 25 16:17:09 2016 +0530
4 LU-8364 ext4: fixes for failover mode.
6 When ext4 runs in failover mode with read-only disk,
7 it may loose part of allocation updates and fail while
8 mounting fs due to group descriptor checks before journal
9 replay not being valid after journal replay is complete.
10 Don't produce panics with on disk checks in read-only mode.
12 Seagate-bug-id: MRP-797
13 Change-Id: I54bee3a0aeb9a15f5ee2a79f7a2a2a905f19af1a
14 Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
15 Signed-off-by: Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com>
16 Reviewed-on: https://review.whamcloud.com/21141
18 Index: linux-4.18.0-32.el8.x86_64/fs/ext4/super.c
19 ===================================================================
20 --- linux-4.18.0-32.el8.x86_64.orig/fs/ext4/super.c
21 +++ linux-4.18.0-32.el8.x86_64/fs/ext4/super.c
22 @@ -4092,11 +4092,6 @@ static int ext4_fill_super(struct super_
25 sbi->s_gdb_count = db_count;
26 - if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) {
27 - ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
28 - ret = -EFSCORRUPTED;
32 timer_setup(&sbi->s_err_report, print_daily_error_info, 0);
34 @@ -4238,6 +4233,13 @@ static int ext4_fill_super(struct super_
35 sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;
39 + if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) {
40 + ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
41 + ret = -EFSCORRUPTED;
42 + goto failed_mount_wq;
45 if (!test_opt(sb, NO_MBCACHE)) {
46 sbi->s_ea_block_cache = ext4_xattr_create_cache();
47 if (!sbi->s_ea_block_cache) {