]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add a extent ref verify tool
authorJosef Bacik <josef@toxicpanda.com>
Fri, 29 Sep 2017 19:43:50 +0000 (15:43 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:28:00 +0000 (12:28 +0100)
commit24471c3fac5acc22a903620d7345c6aa8a2f891b
tree218197c736b2e9755f3f31796f46102a56400082
parentc1abc129498ea20801c924d44359409823da36f4
Btrfs: add a extent ref verify tool

We were having corruption issues that were tied back to problems with
the extent tree.  In order to track them down I built this tool to try
and find the culprit, which was pretty successful.  If you compile with
this tool on it will live verify every ref update that the fs makes and
make sure it is consistent and valid.  I've run this through with
xfstests and haven't gotten any false positives.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update error messages, add fixup from Dan Carpenter to handle errors
  of read_tree_block ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/Kconfig
fs/btrfs/Makefile
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/ref-verify.c [new file with mode: 0644]
fs/btrfs/ref-verify.h [new file with mode: 0644]