]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add more superblock checks
authorDavid Sterba <dsterba@suse.cz>
Tue, 30 Sep 2014 17:16:47 +0000 (19:16 +0200)
committerChris Mason <clm@fb.com>
Fri, 3 Oct 2014 23:14:59 +0000 (16:14 -0700)
commit908701265c4d161441142310762dec799f582d59
tree80cea5b9e2d7264940ae53a5ab2808a34dc107f9
parent6743853c867dcafb39c673949610f1cc76e5b9e8
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>
fs/btrfs/disk-io.c