diff options
author | David Sterba <dsterba@suse.com> | 2018-11-27 08:55:46 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 08:51:42 -0500 |
commit | eb1a524c95206e41c54e8cee25a66f9488a151ef (patch) | |
tree | f1c6598828cdc74af66b171e030a02eb0b7773c3 | |
parent | 688a75b9a30a72cd944aa5e6a428a80472f44877 (diff) |
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: Omar Sandoval <osandov@fb.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/ctree.h | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index becfe1d10e47..99f8fff8f2ae 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -757,38 +757,37 @@ struct btrfs_swapfile_pin { | |||
757 | 757 | ||
758 | bool btrfs_pinned_by_swapfile(struct btrfs_fs_info *fs_info, void *ptr); | 758 | bool btrfs_pinned_by_swapfile(struct btrfs_fs_info *fs_info, void *ptr); |
759 | 759 | ||
760 | #define BTRFS_FS_BARRIER 1 | 760 | enum { |
761 | #define BTRFS_FS_CLOSING_START 2 | 761 | BTRFS_FS_BARRIER, |
762 | #define BTRFS_FS_CLOSING_DONE 3 | 762 | BTRFS_FS_CLOSING_START, |
763 | #define BTRFS_FS_LOG_RECOVERING 4 | 763 | BTRFS_FS_CLOSING_DONE, |
764 | #define BTRFS_FS_OPEN 5 | 764 | BTRFS_FS_LOG_RECOVERING, |
765 | #define BTRFS_FS_QUOTA_ENABLED 6 | 765 | BTRFS_FS_OPEN, |
766 | #define BTRFS_FS_UPDATE_UUID_TREE_GEN 9 | 766 | BTRFS_FS_QUOTA_ENABLED, |
767 | #define BTRFS_FS_CREATING_FREE_SPACE_TREE 10 | 767 | BTRFS_FS_UPDATE_UUID_TREE_GEN, |
768 | #define BTRFS_FS_BTREE_ERR 11 | 768 | BTRFS_FS_CREATING_FREE_SPACE_TREE, |
769 | #define BTRFS_FS_LOG1_ERR 12 | 769 | BTRFS_FS_BTREE_ERR, |
770 | #define BTRFS_FS_LOG2_ERR 13 | 770 | BTRFS_FS_LOG1_ERR, |
771 | #define BTRFS_FS_QUOTA_OVERRIDE 14 | 771 | BTRFS_FS_LOG2_ERR, |
772 | /* Used to record internally whether fs has been frozen */ | 772 | BTRFS_FS_QUOTA_OVERRIDE, |
773 | #define BTRFS_FS_FROZEN 15 | 773 | /* Used to record internally whether fs has been frozen */ |
774 | 774 | BTRFS_FS_FROZEN, | |
775 | /* | 775 | /* |
776 | * Indicate that a whole-filesystem exclusive operation is running | 776 | * Indicate that a whole-filesystem exclusive operation is running |
777 | * (device replace, resize, device add/delete, balance) | 777 | * (device replace, resize, device add/delete, balance) |
778 | */ | 778 | */ |
779 | #define BTRFS_FS_EXCL_OP 16 | 779 | BTRFS_FS_EXCL_OP, |
780 | 780 | /* | |
781 | /* | 781 | * To info transaction_kthread we need an immediate commit so it |
782 | * To info transaction_kthread we need an immediate commit so it doesn't | 782 | * doesn't need to wait for commit_interval |
783 | * need to wait for commit_interval | 783 | */ |
784 | */ | 784 | BTRFS_FS_NEED_ASYNC_COMMIT, |
785 | #define BTRFS_FS_NEED_ASYNC_COMMIT 17 | 785 | /* |
786 | 786 | * Indicate that balance has been set up from the ioctl and is in the | |
787 | /* | 787 | * main phase. The fs_info::balance_ctl is initialized. |
788 | * Indicate that balance has been set up from the ioctl and is in the main | 788 | */ |
789 | * phase. The fs_info::balance_ctl is initialized. | 789 | BTRFS_FS_BALANCE_RUNNING, |
790 | */ | 790 | }; |
791 | #define BTRFS_FS_BALANCE_RUNNING 18 | ||
792 | 791 | ||
793 | struct btrfs_fs_info { | 792 | struct btrfs_fs_info { |
794 | u8 chunk_tree_uuid[BTRFS_UUID_SIZE]; | 793 | u8 chunk_tree_uuid[BTRFS_UUID_SIZE]; |