Btrfs: Add block group pinned accounting back
This patch adds a helper function 'update_pinned_extents' to extent-tree.c. The usage of the helper function is similar to 'update_block_group', the last parameter of the function indicates pin vs unpin. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@@ -292,8 +292,8 @@ struct btrfs_block_group_cache {
|
||||
struct btrfs_block_group_item item;
|
||||
int data;
|
||||
int cached;
|
||||
u64 pinned;
|
||||
};
|
||||
|
||||
struct btrfs_fs_info {
|
||||
u8 fsid[BTRFS_FSID_SIZE];
|
||||
struct btrfs_root *extent_root;
|
||||
@@ -324,8 +324,9 @@ struct btrfs_fs_info {
|
||||
struct completion kobj_unregister;
|
||||
int do_barriers;
|
||||
int closing;
|
||||
};
|
||||
|
||||
u64 total_pinned;
|
||||
};
|
||||
/*
|
||||
* in ram representation of the tree. extent_root is used for all allocations
|
||||
* and for the extent tree extent_root root.
|
||||
|
Reference in New Issue
Block a user