]> git.hungrycats.org Git - linux/commit
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)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sun, 26 Jun 2016 19:02:17 +0000 (15:02 -0400)
commit74eff645124baf09feac35e4d788d44ec3c65328
treef2d9e447fa0b795b0eb7fb33edf7a6921bd05f37
parentf5bac80f22731a272ddeb02cd5e59a4a91ef79c6
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>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit 522a8ff26e193be9151dd22bdf1f46c7759cd637)
(cherry picked from commit 580107319b95d386946fbf1fb6d1ed5cbe1a810e)
fs/btrfs/extent-tree.c