OSDN Git Service

Btrfs: check inconsistence between chunk and block group
authorLiu Bo <bo.li.liu@oracle.com>
Thu, 23 Jun 2016 01:31:27 +0000 (18:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:16:06 +0000 (22:16 +0100)
commita155ec93222648115e6cdf64a1ca6a929c8a66f1
treee97e72e4ff274609b7289be40cb1c8ba214da3ca
parent41fbc649308c559cb35fec6a2692809ecd52bd62
Btrfs: check inconsistence between chunk and block group

commit 6fb37b756acce6d6e045f79c3764206033f617b4 upstream.

With btrfs-corrupt-block, one can drop one chunk item and mounting
will end up with a panic in btrfs_full_stripe_len().

This doesn't not remove the BUG_ON, but instead checks it a bit
earlier when we find the block group item.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/extent-tree.c