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>
This commit is contained in:
Josef Bacik
2022-10-26 15:08:16 -04:00
committed by David Sterba
parent 43dd529abe
commit cb9a10a650

View File

@@ -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 * to make it clear what we're doing. An example is discard_extents in
* btrfs_free_space_ctl. * btrfs_free_space_ctl.
*/ */
#define BTRFS_STAT_NR_ENTRIES 2 enum {
#define BTRFS_STAT_CURR 0 BTRFS_STAT_CURR,
#define BTRFS_STAT_PREV 1 BTRFS_STAT_PREV,
BTRFS_STAT_NR_ENTRIES,
};
struct btrfs_free_space_ctl { struct btrfs_free_space_ctl {
spinlock_t tree_lock; spinlock_t tree_lock;