btrfs-corrupt-block is a very useful tool albeit very neglected. This series aims to give it much needed attention. There is a mix of code-improvements and bug fixes. Code improvement mainly consists of factoring our duplicated code (Patch 1,3,6) and improving the interface of some options (4,5,8,9). The recurring topic here is that instead of having to pass
btrfs-corrupt-block -K <key> -f <field> -<SOME OPTION WHICH CORRUPTS AN ITEM, POINTED TO BY K> make each corrupting option to take the key as an argument to it. Say we want to corrupt an item field (-I options) we now do: btrfs-corrupt-block -I <key> -r <root> /dev/blah instead of btrfs-corrupt-block -I -K <key> -r <root> /dev/blah Some patches also incorporate fixes for bugs (patch 2,7 and 9) I found during my testing. Those usability improvements are needed to enable me to produce tests for the pending free space tree support in userspace. Nikolay Borisov (9): btrfs-progs: btrfs-corrupt-block: Factor out specific-root code btrfs-progs: btrfs-corrupt-block: Correctly handle -r when passing -I btrfs-progs: btrfs-corrupt-block: Factor out key parsing function btrfs-progs: btrfs-corrupt-block: Change -I flag parameter format btrfs-progs: btrfs-corrupt-block: Convert -K flag argument handling to common function btrfs-progs: btrfs-corrupt-block: Factor out common "-r" handling code btrfs-progs: btrfs-corrupt-block: Add support for handling specific root when using -K option btrfs-progs: btrfs-corrupt-block: Change format of -d option btrfs-progs: btrfs-corrupt-block: Fix -D option btrfs-corrupt-block.c | 94 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 37 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html