diff options
author | Anand Jain | 2017-12-04 05:54:52 +0100 |
---|---|---|
committer | David Sterba | 2018-01-22 16:08:15 +0100 |
commit | ebbede42d47dc77d1c20e7468418826e5efa6b29 (patch) | |
tree | 21765212b290a2704ffe2dd0f4a9b8ec80f0c04f /fs/btrfs/volumes.h | |
parent | btrfs: add helper for device path or missing (diff) | |
download | kernel-qcow2-linux-ebbede42d47dc77d1c20e7468418826e5efa6b29.tar.gz kernel-qcow2-linux-ebbede42d47dc77d1c20e7468418826e5efa6b29.tar.xz kernel-qcow2-linux-ebbede42d47dc77d1c20e7468418826e5efa6b29.zip |
btrfs: cleanup device states define BTRFS_DEV_STATE_WRITEABLE
Currently device state is being managed by each individual int
variable such as struct btrfs_device::writeable. Instead of that
declare device state BTRFS_DEV_STATE_WRITEABLE and use the
bit operations.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[ whitespace adjustments ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 60588c259665..893e283c7f15 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -47,6 +47,8 @@ struct btrfs_pending_bios { #define btrfs_device_data_ordered_init(device) do { } while (0) #endif +#define BTRFS_DEV_STATE_WRITEABLE (0) + struct btrfs_device { struct list_head dev_list; struct list_head dev_alloc_list; @@ -69,7 +71,7 @@ struct btrfs_device { /* the mode sent to blkdev_get */ fmode_t mode; - int writeable; + unsigned long dev_state; int in_fs_metadata; int missing; int is_tgtdev_for_dev_replace; |