Lines Matching refs:dev_state

648 		clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state);  in btrfs_open_one_device()
652 clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state); in btrfs_open_one_device()
654 set_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state); in btrfs_open_one_device()
664 clear_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state); in btrfs_open_one_device()
668 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) && in btrfs_open_one_device()
966 if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) { in device_list_add()
968 clear_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state); in device_list_add()
1052 if (test_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state)) { in __btrfs_free_extra_devids()
1054 &device->dev_state) && in __btrfs_free_extra_devids()
1056 &device->dev_state) && in __btrfs_free_extra_devids()
1076 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) { in __btrfs_free_extra_devids()
1078 clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state); in __btrfs_free_extra_devids()
1113 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) { in btrfs_close_bdev()
1125 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) && in btrfs_close_one_device()
1132 clear_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state); in btrfs_close_one_device()
1134 if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) { in btrfs_close_one_device()
1135 clear_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state); in btrfs_close_one_device()
1144 clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state); in btrfs_close_one_device()
1165 WARN_ON(test_bit(BTRFS_DEV_STATE_FLUSH_SENT, &device->dev_state)); in btrfs_close_one_device()
1166 WARN_ON(test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)); in btrfs_close_one_device()
1624 test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) { in find_free_dev_extent()
2000 !test_bit(BTRFS_DEV_STATE_MISSING, &next_device->dev_state) in btrfs_find_next_active_device()
2138 if (test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) in btrfs_rm_device()
2141 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) && in btrfs_rm_device()
2145 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) { in btrfs_rm_device()
2173 clear_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state); in btrfs_rm_device()
2201 if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) in btrfs_rm_device()
2226 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) { in btrfs_rm_device()
2259 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) { in btrfs_rm_device()
2286 if (test_bit(BTRFS_DEV_STATE_MISSING, &srcdev->dev_state)) in btrfs_rm_dev_replace_remove_srcdev()
2289 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &srcdev->dev_state)) in btrfs_rm_dev_replace_remove_srcdev()
2689 set_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state); in btrfs_init_new_device()
2698 set_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state); in btrfs_init_new_device()
2699 clear_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state); in btrfs_init_new_device()
2921 if (!test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) in btrfs_grow_device()
2931 test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) { in btrfs_grow_device()
4865 if (test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) in btrfs_shrink_device()
4883 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) { in btrfs_shrink_device()
5020 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) in btrfs_shrink_device()
5221 if (!test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) { in gather_device_info()
5228 &device->dev_state) || in gather_device_info()
5229 test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) in gather_device_info()
5721 &map->stripes[i].dev->dev_state)) { in btrfs_chunk_writeable()
5726 &map->stripes[i].dev->dev_state)) { in btrfs_chunk_writeable()
6535 if (test_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state) && in dev_args_match_device()
6603 set_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state); in add_missing_dev()
6864 &(map->stripes[i].dev->dev_state)); in read_one_chunk()
6897 clear_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state); in fill_device_from_item()
7012 !test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) { in read_one_dev()
7020 set_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state); in read_one_dev()
7026 &device->dev_state)); in read_one_dev()
7040 BUG_ON(test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)); in read_one_dev()
7057 set_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state); in read_one_dev()
7058 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) && in read_one_dev()
7059 !test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) { in read_one_dev()
7212 test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state) || in btrfs_check_rw_degradable()