Commit eb1a524c authored by David Sterba's avatar David Sterba

btrfs: switch BTRFS_FS_* to enums

We can use simple enum for values that are not part of on-disk format:
internal filesystem states.
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 688a75b9
...@@ -757,38 +757,37 @@ struct btrfs_swapfile_pin { ...@@ -757,38 +757,37 @@ struct btrfs_swapfile_pin {
bool btrfs_pinned_by_swapfile(struct btrfs_fs_info *fs_info, void *ptr); bool btrfs_pinned_by_swapfile(struct btrfs_fs_info *fs_info, void *ptr);
#define BTRFS_FS_BARRIER 1 enum {
#define BTRFS_FS_CLOSING_START 2 BTRFS_FS_BARRIER,
#define BTRFS_FS_CLOSING_DONE 3 BTRFS_FS_CLOSING_START,
#define BTRFS_FS_LOG_RECOVERING 4 BTRFS_FS_CLOSING_DONE,
#define BTRFS_FS_OPEN 5 BTRFS_FS_LOG_RECOVERING,
#define BTRFS_FS_QUOTA_ENABLED 6 BTRFS_FS_OPEN,
#define BTRFS_FS_UPDATE_UUID_TREE_GEN 9 BTRFS_FS_QUOTA_ENABLED,
#define BTRFS_FS_CREATING_FREE_SPACE_TREE 10 BTRFS_FS_UPDATE_UUID_TREE_GEN,
#define BTRFS_FS_BTREE_ERR 11 BTRFS_FS_CREATING_FREE_SPACE_TREE,
#define BTRFS_FS_LOG1_ERR 12 BTRFS_FS_BTREE_ERR,
#define BTRFS_FS_LOG2_ERR 13 BTRFS_FS_LOG1_ERR,
#define BTRFS_FS_QUOTA_OVERRIDE 14 BTRFS_FS_LOG2_ERR,
/* Used to record internally whether fs has been frozen */ BTRFS_FS_QUOTA_OVERRIDE,
#define BTRFS_FS_FROZEN 15 /* Used to record internally whether fs has been frozen */
BTRFS_FS_FROZEN,
/* /*
* Indicate that a whole-filesystem exclusive operation is running * Indicate that a whole-filesystem exclusive operation is running
* (device replace, resize, device add/delete, balance) * (device replace, resize, device add/delete, balance)
*/ */
#define BTRFS_FS_EXCL_OP 16 BTRFS_FS_EXCL_OP,
/*
/* * To info transaction_kthread we need an immediate commit so it
* To info transaction_kthread we need an immediate commit so it doesn't * doesn't need to wait for commit_interval
* need to wait for commit_interval */
*/ BTRFS_FS_NEED_ASYNC_COMMIT,
#define BTRFS_FS_NEED_ASYNC_COMMIT 17 /*
* Indicate that balance has been set up from the ioctl and is in the
/* * main phase. The fs_info::balance_ctl is initialized.
* Indicate that balance has been set up from the ioctl and is in the main */
* phase. The fs_info::balance_ctl is initialized. BTRFS_FS_BALANCE_RUNNING,
*/ };
#define BTRFS_FS_BALANCE_RUNNING 18
struct btrfs_fs_info { struct btrfs_fs_info {
u8 chunk_tree_uuid[BTRFS_UUID_SIZE]; u8 chunk_tree_uuid[BTRFS_UUID_SIZE];
......
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