btrfs: cleanup device states define BTRFS_DEV_STATE_REPLACE_TGT
Currently device state is being managed by each individual int variable such as struct btrfs_device::is_tgtdev_for_dev_replace. Instead of that declare btrfs_device::dev_state BTRFS_DEV_STATE_MISSING and use the bit operations. Signed-off-by: Anand Jain <anand.jain@oracle.com> [ whitespace adjustments ] Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -50,6 +50,7 @@ struct btrfs_pending_bios {
|
||||
#define BTRFS_DEV_STATE_WRITEABLE (0)
|
||||
#define BTRFS_DEV_STATE_IN_FS_METADATA (1)
|
||||
#define BTRFS_DEV_STATE_MISSING (2)
|
||||
#define BTRFS_DEV_STATE_REPLACE_TGT (3)
|
||||
|
||||
struct btrfs_device {
|
||||
struct list_head dev_list;
|
||||
@@ -74,7 +75,6 @@ struct btrfs_device {
|
||||
fmode_t mode;
|
||||
|
||||
unsigned long dev_state;
|
||||
int is_tgtdev_for_dev_replace;
|
||||
blk_status_t last_flush_error;
|
||||
int flush_bio_sent;
|
||||
|
||||
|
Reference in New Issue
Block a user