btrfs-progs: Add chunk corrupt funtion to btrfs-corrupt-block
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Fri, 7 Jun 2013 02:25:59 +0000 (10:25 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 9 Aug 2013 12:32:35 +0000 (14:32 +0200)
commitc118c21b3e855c37c01db4be5746055629b70a19
treee278b0bb2681163c20df3d32f30170a8d2e2dadc
parent936d520a4818c8cc3b969e0065e3242cb8ed0b1b
btrfs-progs: Add chunk corrupt funtion to btrfs-corrupt-block

Add chunk corrupt function to btrfs-corrupt-block.
This funtion can be used to delete or corrupt a given chunk or the whole
chunk tree.

This funtion is useful to test the coming chunk recover funtion.

BTW, since the chunk recover funtion is based on whole partion scanning,
so the COW should be disabled and edit leaf without changing generation.
Which makes btrfs_commit_transation giving some ignorable warning.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
btrfs-corrupt-block.c