mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
btrfs: qgroup: use qgroup_mark_inconsistent() in quick_update_accounting()
When quick_update_accounting() fails to handle a qgroup which is not fully exclusive (its exclusive number doesn't match the reference one), we have to mark the qgroup inconsistent. Unlike other locations we didn't use qgroup_mark_inconsistent(), thus when such problem happens no extra error message is shown. Use the helper in quick_update_accounting(), which does not only show the reason of marking qgroup inconsistent, but also cancels any running rescan and skips dirty accounting, avoiding wasting CPU time on already inconsistent qgroup numbers. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
dd906477cc
commit
65583d4749
|
|
@ -1562,7 +1562,10 @@ static int quick_update_accounting(struct btrfs_fs_info *fs_info,
|
|||
}
|
||||
out:
|
||||
if (ret)
|
||||
set_bit(BTRFS_QGROUP_STATUS_BIT_INCONSISTENT, &fs_info->qgroup_flags);
|
||||
qgroup_mark_inconsistent(fs_info,
|
||||
"unable to do quick excl updating for qgroup %hu/%llu, ret=%d",
|
||||
btrfs_qgroup_level(src),
|
||||
btrfs_qgroup_subvolid(src), ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user