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:
parent
b95e7e87bb
commit
a5d136b540
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue