提交 cb9a10a6 编写于 作者: J Josef Bacik 提交者: David Sterba

btrfs: convert discard stat defs to enum

Do away with the defines and use an enum as it's cleaner.
Suggested-by: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: NJosef Bacik <josef@toxicpanda.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 43dd529a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册