Commit b00146b5 authored by David Sterba's avatar David Sterba

btrfs: switch BTRFS_FS_STATE_* to enums

We can use simple enum for values that are not part of on-disk format:
global filesystem states.
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 da12fe54
...@@ -109,13 +109,26 @@ static inline unsigned long btrfs_chunk_item_size(int num_stripes) ...@@ -109,13 +109,26 @@ static inline unsigned long btrfs_chunk_item_size(int num_stripes)
} }
/* /*
* File system states * Runtime (in-memory) states of filesystem
*/ */
#define BTRFS_FS_STATE_ERROR 0 enum {
#define BTRFS_FS_STATE_REMOUNTING 1 /* Global indicator of serious filesystem errors */
#define BTRFS_FS_STATE_TRANS_ABORTED 2 BTRFS_FS_STATE_ERROR,
#define BTRFS_FS_STATE_DEV_REPLACING 3 /*
#define BTRFS_FS_STATE_DUMMY_FS_INFO 4 * Filesystem is being remounted, allow to skip some operations, like
* defrag
*/
BTRFS_FS_STATE_REMOUNTING,
/* Track if a transaction abort has been reported on this filesystem */
BTRFS_FS_STATE_TRANS_ABORTED,
/*
* Bio operations should be blocked on this filesystem because a source
* or target device is being destroyed as part of a device replace
*/
BTRFS_FS_STATE_DEV_REPLACING,
/* The btrfs_fs_info created for self-tests */
BTRFS_FS_STATE_DUMMY_FS_INFO,
};
#define BTRFS_BACKREF_REV_MAX 256 #define BTRFS_BACKREF_REV_MAX 256
#define BTRFS_BACKREF_REV_SHIFT 56 #define BTRFS_BACKREF_REV_SHIFT 56
......
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