From a5d136b540d015038b2f8e257b57655d15f7352a Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 18 Mar 2020 17:21:40 -0300 Subject: [PATCH] btrfs-progs: qgroup-verify: use fs_info::readonly to check if we should repair qgroups In fact qgroup-verify is just kind of offline qgroup rescan, and later mkfs qgroup support will reuse it. So qgroup-verify doesn't really need to rely the global variable @repair to check if it should repair qgroups. Instead check fs_info->readonly to do the repair. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- check/qgroup-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check/qgroup-verify.c b/check/qgroup-verify.c index 3e134f62..e93a7a2d 100644 --- a/check/qgroup-verify.c +++ b/check/qgroup-verify.c @@ -1614,7 +1614,7 @@ int repair_qgroups(struct btrfs_fs_info *info, int *repaired) *repaired = 0; - if (!repair) + if (info->readonly) return 0; list_for_each_entry_safe(count, tmpcount, &bad_qgroups, bad_list) {