path: root/qgroup-verify.h
diff options
authorQu Wenruo <>2018-04-30 14:16:59 +0800
committerDavid Sterba <>2018-06-07 16:37:33 +0200
commit4bd7bbb6f6859583da1a81406cb3c02d613c9b2c (patch)
treee245c9254672712296f3d8d24b69f2688c0b1cfd /qgroup-verify.h
parent9f8316f1c870415383d8761e1455f1375e2e00b0 (diff)
btrfs-progs: check: Make btrfs check return error for qgroup mismatch
Current btrfs-check will check qgroup consistency, but even when it finds something wrong, the return value is still 0. Fix it by allowing report_qgroups() to return int to indicate qgroup mismatch, and also add extra logic to return no error if qgroup repair is successful. Without this patch, fstests can't detect qgroup corruption by its fsck alone. Signed-off-by: Qu Wenruo <> Signed-off-by: David Sterba <>
Diffstat (limited to 'qgroup-verify.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/qgroup-verify.h b/qgroup-verify.h
index d7d83a46..14d36bbf 100644
--- a/qgroup-verify.h
+++ b/qgroup-verify.h
@@ -23,7 +23,7 @@
#include "ctree.h"
int qgroup_verify_all(struct btrfs_fs_info *info);
-void report_qgroups(int all);
+int report_qgroups(int all);
int repair_qgroups(struct btrfs_fs_info *info, int *repaired);
int print_extent_state(struct btrfs_fs_info *info, u64 subvol);