path: root/print-tree.c
diff options
authorMark Fasheh <>2014-05-07 13:07:17 -0700
committerDavid Sterba <>2014-08-22 14:39:33 +0200
commit96ec888aad41969d728ba62c1778d6e8ebe6bd4e (patch)
tree413ea722f864ba14714ad47a57e479e29ce6d848 /print-tree.c
parent2ab405af95d43972b57c7806981220a6949df643 (diff)
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 <>
Diffstat (limited to 'print-tree.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/print-tree.c b/print-tree.c
index a3a6c66f..cb5c2e13 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -251,7 +251,7 @@ static void print_file_extent_item(struct extent_buffer *eb,
btrfs_file_extent_compression(eb, fi));
-static void print_extent_item(struct extent_buffer *eb, int slot, int metadata)
+void print_extent_item(struct extent_buffer *eb, int slot, int metadata)
struct btrfs_extent_item *ei;
struct btrfs_extent_inline_ref *iref;