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)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Jul 2016 11:52:25 +0000 (13:52 +0200)
commit6fb37b756acce6d6e045f79c3764206033f617b4
tree0279142b07c97a236b5dc5eea48db7bc10c80179
parentc1fd5c30d1328e0a0c3aafc3768b9cea94d7b28f
Btrfs: check inconsistence between chunk and block group

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>
fs/btrfs/extent-tree.c