diff options
author | Mark Fasheh <mfasheh@suse.de> | 2014-05-07 13:07:17 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-08-22 14:39:33 +0200 |
commit | 96ec888aad41969d728ba62c1778d6e8ebe6bd4e (patch) | |
tree | 413ea722f864ba14714ad47a57e479e29ce6d848 /print-tree.h | |
parent | 2ab405af95d43972b57c7806981220a6949df643 (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 <mfasheh@suse.de>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'print-tree.h')
-rw-r--r-- | print-tree.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 |