From: Josef Bacik Date: Wed, 14 Sep 2022 15:06:32 +0000 (-0400) Subject: btrfs: move discard stat defs to free-space-cache.h X-Git-Tag: v6.6.17~5604^2~270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=390d89ccf672ec79b84037d4af834b2275ff7cb9;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ea83c17..03d665b 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -63,15 +63,6 @@ struct reloc_control; #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) { BUG_ON(num_stripes == 0); diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h index 6d419ba..eaf30f6 100644 --- a/fs/btrfs/free-space-cache.h +++ b/fs/btrfs/free-space-cache.h @@ -43,6 +43,15 @@ static inline bool btrfs_free_space_trimming_bitmap( 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 { spinlock_t tree_lock; struct rb_root free_space_offset;