diff options
| author | Anand Jain <[email protected]> | 2017-12-04 04:54:54 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2018-01-22 15:08:15 +0000 |
| commit | e6e674bd4d54fe8d47a06914f3b90752785b4882 (patch) | |
| tree | e310b1c74e52de8b03ebd48804ae262820fc6216 /fs/btrfs/dev-replace.c | |
| parent | btrfs: cleanup device states define BTRFS_DEV_STATE_IN_FS_METADATA (diff) | |
| download | kernel-e6e674bd4d54fe8d47a06914f3b90752785b4882.tar.gz kernel-e6e674bd4d54fe8d47a06914f3b90752785b4882.zip | |
btrfs: cleanup device states define BTRFS_DEV_STATE_MISSING
Currently device state is being managed by each individual int
variable such as struct btrfs_device::missing. Instead of that
declare btrfs_device::dev_state BTRFS_DEV_STATE_MISSING and use
the bit operations.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by : Nikolay Borisov <[email protected]>
[ whitespace adjustments ]
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
| -rw-r--r-- | fs/btrfs/dev-replace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 483eb62b9b27..d2c820c6f91e 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c @@ -306,7 +306,7 @@ void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info) static char* btrfs_dev_name(struct btrfs_device *device) { - if (device->missing) + if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) return "<missing disk>"; else return rcu_str_deref(device->name); |
