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 <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2020-03-18 17:21:40 -03:00 committed by David Sterba
parent b95e7e87bb
commit a5d136b540
1 changed files with 1 additions and 1 deletions

View File

@ -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) {