btrfs-progs: make fsck deal with bogus items
authorJosef Bacik <jbacik@fb.com>
Fri, 3 Oct 2014 14:54:26 +0000 (10:54 -0400)
committerDavid Sterba <dsterba@suse.cz>
Tue, 14 Oct 2014 09:10:36 +0000 (11:10 +0200)
commit01f868b5a99b412212ede924a81aa15e6d408381
tree1bfc7d30e737f3fcb389c5021afb37af473a17ed
parentf738a758af3b04c302dca2a1c50b9a021a40148c
btrfs-progs: make fsck deal with bogus items

We can deal with corrupt items by deleting them in a few cases.  Fsck can easily
recover from a missing extent item or a dir index item.  So if we notice a item
is completely bogus and it is of a key that we know we can repair then just
delete it and carry on.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-check.c
tests/fsck-tests/005-bad-item-offset.img [new file with mode: 0644]