btrfs-progs: corrupt-block: Add support for handling specific root when using -K...
commit98eda1c098a5300bccc9df636948f422d130f626
authorNikolay Borisov <nborisov@suse.com>
Mon, 14 May 2018 11:13:32 +0000 (14 14:13 +0300)
committerDavid Sterba <dsterba@suse.com>
Thu, 7 Jun 2018 14:37:39 +0000 (7 16:37 +0200)
tree063ab6f4d247691647fd49920e3f3fc82ade2fd5
parent32acc8eed29847616f6d99d70b9dac1466e4ec4f
btrfs-progs: corrupt-block: Add support for handling specific root when using -K option

Currently the -K option supports corrupting items only in the default
root (which is the root tree). This makes it impossible to test the
free-space recovery (or any other) code for that matter. Fix it by
using the root corresponding to the one passed in -r (if any).

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
btrfs-corrupt-block.c