From a804254361a8cf04696ba3869a66c131ee6c3d4b Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Mon, 4 Jul 2016 14:57:38 +0200 Subject: 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 Signed-off-by: David Sterba --- print-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'print-tree.c') diff --git a/print-tree.c b/print-tree.c index 746f25be..9f9e11e2 100644 --- a/print-tree.c +++ b/print-tree.c @@ -1037,7 +1037,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) btrfs_qgroup_status_generation(l, qg_status), flags_str, (unsigned long long) - btrfs_qgroup_status_scan(l, qg_status)); + btrfs_qgroup_status_rescan(l, qg_status)); break; case BTRFS_QGROUP_RELATION_KEY: break; -- cgit v1.2.3