From 072c61ee24b70816721dec1c54d0cc558ea91631 Mon Sep 17 00:00:00 2001 From: Li Dongyang Date: Wed, 12 Sep 2018 15:50:58 +1000 Subject: [PATCH] LU-11071 ldiskfs: fix ldiskfs patch for ubuntu18 the original ext4-corrupted-inode-block-bitmaps-handling-patches.patch missed the changes to ext4_validate_inode_bitmap, add it back Test-Parameters: trivial Signed-off-by: Li Dongyang Change-Id: I42ff97be5c5680be04d69e0e818b622df6bd400d Reviewed-on: https://review.whamcloud.com/33144 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Yang Sheng Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- ...pted-inode-block-bitmaps-handling-patches.patch | 33 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/ubuntu18/ext4-corrupted-inode-block-bitmaps-handling-patches.patch b/ldiskfs/kernel_patches/patches/ubuntu18/ext4-corrupted-inode-block-bitmaps-handling-patches.patch index 7dd6da0..526e8e9 100644 --- a/ldiskfs/kernel_patches/patches/ubuntu18/ext4-corrupted-inode-block-bitmaps-handling-patches.patch +++ b/ldiskfs/kernel_patches/patches/ubuntu18/ext4-corrupted-inode-block-bitmaps-handling-patches.patch @@ -155,7 +155,36 @@ Index: linux-4.15.0/fs/ext4/ialloc.c return -EFSBADCRC; } -@@ -194,8 +184,6 @@ ext4_read_inode_bitmap(struct super_bloc +@@ -121,7 +111,6 @@ static int ext4_validate_inode_bitmap(st + { + ext4_fsblk_t blk; + struct ext4_group_info *grp = ext4_get_group_info(sb, block_group); +- struct ext4_sb_info *sbi = EXT4_SB(sb); + + if (buffer_verified(bh)) + return 0; +@@ -133,16 +122,10 @@ static int ext4_validate_inode_bitmap(st + if (!ext4_inode_bitmap_csum_verify(sb, block_group, desc, bh, + EXT4_INODES_PER_GROUP(sb) / 8)) { + ext4_unlock_group(sb, block_group); +- ext4_error(sb, "Corrupt inode bitmap - block_group = %u, " +- "inode_bitmap = %llu", block_group, blk); +- grp = ext4_get_group_info(sb, block_group); +- if (!EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) { +- int count; +- count = ext4_free_inodes_count(sb, desc); +- percpu_counter_sub(&sbi->s_freeinodes_counter, +- count); +- } +- set_bit(EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT, &grp->bb_state); ++ ext4_corrupted_block_group(sb, block_group, ++ EXT4_GROUP_INFO_IBITMAP_CORRUPT, ++ "Corrupt inode bitmap - block_group = %u, inode_bitmap = %llu", ++ block_group, blk); + return -EFSBADCRC; + } + set_buffer_verified(bh); +@@ -194,8 +177,6 @@ ext4_read_inode_bitmap(struct super_bloc ext4_unlock_group(sb, block_group); unlock_buffer(bh); if (err) { @@ -164,7 +193,7 @@ Index: linux-4.15.0/fs/ext4/ialloc.c goto out; } return bh; -@@ -371,14 +359,9 @@ out: +@@ -371,14 +352,9 @@ out: if (!fatal) fatal = err; } else { -- 1.8.3.1