Whamcloud - gitweb
LU-8364 ldiskfs: fixes for failover mode
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / sles11sp3 / ext4-dont-check-before-replay.patch
1 Index: linux-stage/fs/ext4/super.c
2 When ldiskfs run in failover mode whith read-only disk.
3 Part of allocation updates are lost and ldiskfs may fail
4 while mounting this is due to inconsistent state of
5 group-descriptor. Group-descriptor check is added after
6 journal replay.
7 ===================================================================
8 --- linux-stage/fs/ext4/super.c 2016-11-24 20:50:46.736527130 +0530
9 +++ linux-stage.orig/fs/ext4/super.c    2016-11-24 20:54:14.941779453 +0530
10 @@ -3429,10 +3429,6 @@
11                         goto failed_mount2;
12                 }
13         }
14 -       if (!ext4_check_descriptors(sb, &first_not_zeroed)) {
15 -               ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
16 -               goto failed_mount2;
17 -       }
18         if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG))
19                 if (!ext4_fill_flex_info(sb)) {
20                         ext4_msg(sb, KERN_ERR,
21 @@ -3609,6 +3605,10 @@
22         sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;
23
24  no_journal:
25 +       if (!ext4_check_descriptors(sb, &first_not_zeroed)) {
26 +               ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
27 +               goto failed_mount_wq;
28 +       }
29         /*
30          * The maximum number of concurrent works can be high and
31          * concurrency isn't really necessary.  Limit it to 1.