mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-18 04:55:20 +00:00
btrfs-progs: add commit_root_sem to btrfs_fs_info
This is used in ctree.c around getting the old root, add this to our btrfs_fs_info to make it more straightforward 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:
parent
f7271ef547
commit
ec9cbf2f43
@ -329,6 +329,7 @@ struct btrfs_fs_info {
|
|||||||
struct extent_io_tree *excluded_extents;
|
struct extent_io_tree *excluded_extents;
|
||||||
|
|
||||||
spinlock_t trans_lock;
|
spinlock_t trans_lock;
|
||||||
|
struct rw_semaphore commit_root_sem;
|
||||||
|
|
||||||
struct rb_root block_group_cache_tree;
|
struct rb_root block_group_cache_tree;
|
||||||
/* logical->physical extent mapping */
|
/* logical->physical extent mapping */
|
||||||
|
@ -879,6 +879,7 @@ struct btrfs_fs_info *btrfs_new_fs_info(int writable, u64 sb_bytenr)
|
|||||||
INIT_LIST_HEAD(&fs_info->recow_ebs);
|
INIT_LIST_HEAD(&fs_info->recow_ebs);
|
||||||
|
|
||||||
spin_lock_init(&fs_info->trans_lock);
|
spin_lock_init(&fs_info->trans_lock);
|
||||||
|
init_rwsem(&fs_info->commit_root_sem);
|
||||||
|
|
||||||
if (!writable)
|
if (!writable)
|
||||||
fs_info->readonly = 1;
|
fs_info->readonly = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user