btrfs-progs: check: write corrected qgroup info to disk
authorMark Fasheh <mfasheh@suse.de>
Mon, 4 Jul 2016 12:57:38 +0000 (14:57 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 13 Jul 2016 16:44:26 +0000 (18:44 +0200)
commita804254361a8cf04696ba3869a66c131ee6c3d4b
tree1f217e479b660e3ee0e52e0fb3ac8e3a27b76f26
parent93dabf211d74daf6e3de642bdd887a90a00f7b49
btrfs-progs: check: write corrected qgroup info to disk

Now that we can verify all qgroups, we can write the corrected qgroups out
to disk when '--repair' is specified. The qgroup status item is also updated
to clear any out-of-date state. The repair_ functions were modeled after the
inode repair code in cmds-check.c.

I also renamed the 'scan' member of qgroup_status_item to 'rescan' in order
to keep consistency with the kernel.

Testing this was easy, I just reproduced qgroup inconsistencies via the
usual routes and had btrfsck fix them.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c
ctree.h
print-tree.c
qgroup-verify.c
qgroup-verify.h