btrfs-progs: qgroup: add qgroup_lookup::flags member

This allows the users to identify if the running qgroup mode and whether
the numbers are already inconsistent.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2024-05-09 18:42:31 +09:30 committed by David Sterba
parent 1297013cea
commit 468bbb6b25

View File

@ -65,6 +65,8 @@ struct btrfs_qgroup_list {
};
struct qgroup_lookup {
/* This matches btrfs_qgroup_status_item::flags. */
u64 flags;
struct rb_root root;
};
@ -1313,6 +1315,7 @@ static int __qgroups_search(int fd, struct btrfs_tree_search_args *args,
case BTRFS_QGROUP_STATUS_KEY:
si = btrfs_tree_search_data(args, off);
flags = btrfs_stack_qgroup_status_flags(si);
qgroup_lookup->flags = flags;
print_status_flag_warning(flags);
break;