ACK: [SRU][Bionic][PATCH 1/1] UBUNTU: SAUCE: ext4: fix ext4_validate_inode_bitmap: comm stress-ng: Corrupt inode bitmap
Colin Ian King
colin.king at canonical.com
Tue Jul 10 22:25:23 UTC 2018
On 10/07/18 23:11, Kamal Mostafa wrote:
> From: "Theodore Y. Ts'o" <tytso at mit.edu>
>
> BugLink: http://bugs.launchpad.net/bugs/1780137
>
> Fix regression triggered by the stress-ng[*] "chdir" test, with LKML test
> patch.
>
> Regression observed on some arm64 server platforms:
>
> EXT4-fs error (device sda1): ext4_validate_inode_bitmap:99: comm stress-ng: Corrupt inode bitmap
>
> Reference: https://lkml.org/lkml/2018/7/7/2
>
> Reported-by: dann frazier <dann.frazier at canonical.com>
> Tested-by: dann frazier <dann.frazier at canonical.com>
> Fixes: 044e6e3d74a3 ext4: don't update checksum of new initialized bitmaps
> Signed-off-by: Kamal Mostafa <kamal at canonical.com>
> ---
> fs/ext4/ialloc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> index 5559313..b5e2cc2 100644
> --- a/fs/ext4/ialloc.c
> +++ b/fs/ext4/ialloc.c
> @@ -91,6 +91,8 @@ static int ext4_validate_inode_bitmap(struct super_block *sb,
> return -EFSCORRUPTED;
>
> ext4_lock_group(sb, block_group);
> + if (buffer_verified(bh))
> + goto verified;
> blk = ext4_inode_bitmap(sb, desc);
> if (!ext4_inode_bitmap_csum_verify(sb, block_group, desc, bh,
> EXT4_INODES_PER_GROUP(sb) / 8)) {
> @@ -108,6 +110,7 @@ static int ext4_validate_inode_bitmap(struct super_block *sb,
> return -EFSBADCRC;
> }
> set_buffer_verified(bh);
> +verified:
> ext4_unlock_group(sb, block_group);
> return 0;
> }
>
Fixes the reported issue, can't argue with that.
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the kernel-team
mailing list