btrfs-progs: add trans_lock to fs_info
This exists in the kernel, and is touched by ctree.c, add it to the btrfs_fs_info to make syncing ctree.c more straightforward. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
a7c33f90b4
commit
f7271ef547
|
@ -328,6 +328,8 @@ struct btrfs_fs_info {
|
|||
struct extent_io_tree extent_ins;
|
||||
struct extent_io_tree *excluded_extents;
|
||||
|
||||
spinlock_t trans_lock;
|
||||
|
||||
struct rb_root block_group_cache_tree;
|
||||
/* logical->physical extent mapping */
|
||||
struct btrfs_mapping_tree mapping_tree;
|
||||
|
|
|
@ -878,6 +878,8 @@ struct btrfs_fs_info *btrfs_new_fs_info(int writable, u64 sb_bytenr)
|
|||
INIT_LIST_HEAD(&fs_info->space_info);
|
||||
INIT_LIST_HEAD(&fs_info->recow_ebs);
|
||||
|
||||
spin_lock_init(&fs_info->trans_lock);
|
||||
|
||||
if (!writable)
|
||||
fs_info->readonly = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue