btrfs-progs: add accounting_lock to btrfs_root

This is used to protect the used count for btrfs_root in the kernel,
sync it to btrfs-progs to allow us to sync ctree.c into btrfs-progs.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2023-04-19 17:23:58 -04:00 committed by David Sterba
parent 4b968a3bf7
commit 79e9fcd4f9

View file

@ -479,6 +479,8 @@ struct btrfs_root {
/* the dirty list is only used by non-reference counted roots */
struct list_head dirty_list;
struct rb_node rb_node;
spinlock_t accounting_lock;
};
static inline u64 btrfs_root_id(const struct btrfs_root *root)