summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2022-10-26 21:08:16 +0200
committerDavid Sterba <dsterba@suse.com>2022-12-05 18:00:45 +0100
commitcb9a10a6504bb35095e97f4839fcf353bf1458ea (patch)
treeff77f9eccfb79a91c89b4891c57f5dadf6122e02 /fs/btrfs/free-space-cache.h
parentbtrfs: update function comments (diff)
downloadlinux-cb9a10a6504bb35095e97f4839fcf353bf1458ea.tar.xz
linux-cb9a10a6504bb35095e97f4839fcf353bf1458ea.zip
btrfs: convert discard stat defs to enum
Do away with the defines and use an enum as it's cleaner. Suggested-by: Johannes Thumshirn <johannes.thumshirn@wdc.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>
Diffstat (limited to 'fs/btrfs/free-space-cache.h')
-rw-r--r--fs/btrfs/free-space-cache.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index cab954a9d97b..a855e0483e03 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -48,9 +48,11 @@ static inline bool btrfs_free_space_trimming_bitmap(
* 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
+enum {
+ BTRFS_STAT_CURR,
+ BTRFS_STAT_PREV,
+ BTRFS_STAT_NR_ENTRIES,
+};
struct btrfs_free_space_ctl {
spinlock_t tree_lock;