]> git.hungrycats.org Git - linux/commit
btrfs: add more superblock checks
authorDavid Sterba <dsterba@suse.cz>
Tue, 30 Sep 2014 17:16:47 +0000 (19:16 +0200)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 23 Jan 2015 13:15:07 +0000 (08:15 -0500)
commitb70473fd9f361a1952fbd00462da13ace2c84452
tree52be9d53239b45860a7420dbfe486466dad06ca5
parent17c98c71d73d527effe528344b429711510d86a4
btrfs: add more superblock checks

Populate btrfs_check_super_valid() with checks that try to verify
consistency of superblock by additional conditions that may arise from
corrupted devices or bitflips. Some of tests are only hints and issue
warnings instead of failing the mount, basically when the checks are
derived from the data found in the superblock.

Tested on a broken image provided by Qu.

Reported-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit c926093ec516f5d316ecdf8c1be11f577ac71b85)
fs/btrfs/disk-io.c