mirror of
https://github.com/torvalds/linux.git
synced 2025-11-02 17:49:03 +02:00
btrfs: move discard stat defs to free-space-cache.h
These definitions are used for discard statistics, move them out of ctree.h and put them in free-space-cache.h. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
ed4c491a3d
commit
390d89ccf6
2 changed files with 9 additions and 9 deletions
|
|
@ -63,15 +63,6 @@ struct reloc_control;
|
||||||
|
|
||||||
#define BTRFS_MAX_EXTENT_SIZE SZ_128M
|
#define BTRFS_MAX_EXTENT_SIZE SZ_128M
|
||||||
|
|
||||||
/*
|
|
||||||
* Deltas are an effective way to populate global statistics. Give macro names
|
|
||||||
* to make it clear what we're doing. An example is discard_extents in
|
|
||||||
* btrfs_free_space_ctl.
|
|
||||||
*/
|
|
||||||
#define BTRFS_STAT_NR_ENTRIES 2
|
|
||||||
#define BTRFS_STAT_CURR 0
|
|
||||||
#define BTRFS_STAT_PREV 1
|
|
||||||
|
|
||||||
static inline unsigned long btrfs_chunk_item_size(int num_stripes)
|
static inline unsigned long btrfs_chunk_item_size(int num_stripes)
|
||||||
{
|
{
|
||||||
BUG_ON(num_stripes == 0);
|
BUG_ON(num_stripes == 0);
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,15 @@ static inline bool btrfs_free_space_trimming_bitmap(
|
||||||
return (info->trim_state == BTRFS_TRIM_STATE_TRIMMING);
|
return (info->trim_state == BTRFS_TRIM_STATE_TRIMMING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Deltas are an effective way to populate global statistics. Give macro names
|
||||||
|
* to make it clear what we're doing. An example is discard_extents in
|
||||||
|
* btrfs_free_space_ctl.
|
||||||
|
*/
|
||||||
|
#define BTRFS_STAT_NR_ENTRIES 2
|
||||||
|
#define BTRFS_STAT_CURR 0
|
||||||
|
#define BTRFS_STAT_PREV 1
|
||||||
|
|
||||||
struct btrfs_free_space_ctl {
|
struct btrfs_free_space_ctl {
|
||||||
spinlock_t tree_lock;
|
spinlock_t tree_lock;
|
||||||
struct rb_root free_space_offset;
|
struct rb_root free_space_offset;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue