Commit 61fa90c1 authored by David Sterba's avatar David Sterba

btrfs: switch BTRFS_ROOT_* to enums

We can use simple enum for values that are not part of on-disk format:
root tree flags.
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent eb1a524c
...@@ -1180,22 +1180,23 @@ struct btrfs_subvolume_writers { ...@@ -1180,22 +1180,23 @@ struct btrfs_subvolume_writers {
/* /*
* The state of btrfs root * The state of btrfs root
*/ */
/* enum {
* btrfs_record_root_in_trans is a multi-step process, /*
* and it can race with the balancing code. But the * btrfs_record_root_in_trans is a multi-step process, and it can race
* race is very small, and only the first time the root * with the balancing code. But the race is very small, and only the
* is added to each transaction. So IN_TRANS_SETUP * first time the root is added to each transaction. So IN_TRANS_SETUP
* is used to tell us when more checks are required * is used to tell us when more checks are required
*/ */
#define BTRFS_ROOT_IN_TRANS_SETUP 0 BTRFS_ROOT_IN_TRANS_SETUP,
#define BTRFS_ROOT_REF_COWS 1 BTRFS_ROOT_REF_COWS,
#define BTRFS_ROOT_TRACK_DIRTY 2 BTRFS_ROOT_TRACK_DIRTY,
#define BTRFS_ROOT_IN_RADIX 3 BTRFS_ROOT_IN_RADIX,
#define BTRFS_ROOT_ORPHAN_ITEM_INSERTED 4 BTRFS_ROOT_ORPHAN_ITEM_INSERTED,
#define BTRFS_ROOT_DEFRAG_RUNNING 5 BTRFS_ROOT_DEFRAG_RUNNING,
#define BTRFS_ROOT_FORCE_COW 6 BTRFS_ROOT_FORCE_COW,
#define BTRFS_ROOT_MULTI_LOG_TASKS 7 BTRFS_ROOT_MULTI_LOG_TASKS,
#define BTRFS_ROOT_DIRTY 8 BTRFS_ROOT_DIRTY,
};
/* /*
* in ram representation of the tree. extent_root is used for all allocations * in ram representation of the tree. extent_root is used for all allocations
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment