X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=ldiskfs%2Fkernel_patches%2Fpatches%2Frhel7.6%2Fext4-dont-check-before-replay.patch;fp=ldiskfs%2Fkernel_patches%2Fpatches%2Frhel7.6%2Fext4-dont-check-before-replay.patch;h=74ea752be1ddf24b255a80b9c2d4fd5d226a3ba4;hp=0000000000000000000000000000000000000000;hb=b23c1255ec0a82515c35f4cccfe87cd21c1d9746;hpb=03f077a5dbcd9c4096c6f6ff1bf12b8f39a16603;ds=sidebyside diff --git a/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dont-check-before-replay.patch b/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dont-check-before-replay.patch new file mode 100644 index 0000000..74ea752 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dont-check-before-replay.patch @@ -0,0 +1,34 @@ +Index: linux-stage/fs/ext4/super.c +When ldiskfs run in failover mode whith read-only disk. +Part of allocation updates are lost and ldiskfs may fail +while mounting this is due to inconsistent state of +group-descriptor. Group-descriptor check is added after +journal replay. +=================================================================== +--- linux-stage/fs/ext4/super.c 2016-11-06 15:15:30.892386878 +0530 ++++ linux-stage.orig.1/fs/ext4/super.c 2016-11-08 10:56:45.579892189 +0530 +@@ -4156,11 +4156,6 @@ static int ext4_fill_super(struct super_ + } + } + sbi->s_gdb_count = db_count; +- if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) { +- ext4_msg(sb, KERN_ERR, "group descriptors corrupted!"); +- goto failed_mount2; +- } +- + get_random_bytes(&sbi->s_next_generation, sizeof(u32)); + spin_lock_init(&sbi->s_next_gen_lock); + +@@ -4280,6 +4275,12 @@ static int ext4_fill_super(struct super_ + sbi->s_journal->j_commit_callback = ext4_journal_commit_callback; + + no_journal: ++ ++ if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) { ++ ext4_msg(sb, KERN_ERR, "group descriptors corrupted!"); ++ goto failed_mount_wq; ++ } ++ + /* + * Get the # of file system overhead blocks from the + * superblock if present.