From 96ec888aad41969d728ba62c1778d6e8ebe6bd4e Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Wed, 7 May 2014 13:07:17 -0700 Subject: btrfs-progs: add quota group verify code This patch adds functionality (in qgroup-verify.c) to compute bytecounts in subvolume quota groups. The original groups are read in and stored in memory so that after we compute our own bytecounts, we can compare them with those on disk. A print function is provided to do this comparison and show the results on the console. A 'qgroup check' pass is added to btrfsck. If any subvolume quota groups differ from what we compute, the differences for them are printed. We also provide an option '--qgroup-report' which will run only the quota check code and print a report on all quota groups. Other than making it possible to verify that our qgroup changes work correctly, this mode can also be used in xfstests for automated checking after qgroup tests. This patch does not address the following: - compressed counts are identical to non compressed, because kernel doesn't make the distinction yet. Adding the code to verify compressed counts shouldn't be hard at all though once kernel can do this. - It is only concerned with subvolume quota groups (like most of btrfs-progs). Signed-off-by: Mark Fasheh Signed-off-by: David Sterba --- print-tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'print-tree.h') diff --git a/print-tree.h b/print-tree.h index 550be0f3..48dc68a1 100644 --- a/print-tree.h +++ b/print-tree.h @@ -22,4 +22,5 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l); void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *t, int follow); void btrfs_print_key(struct btrfs_disk_key *disk_key); void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk); +void print_extent_item(struct extent_buffer *eb, int slot, int metadata); #endif -- cgit v1.2.3