Lines Matching refs:device
363 struct btrfs_device *device; in btrfs_parse_param() local
366 device = btrfs_scan_one_device(param->string, false); in btrfs_parse_param()
368 if (IS_ERR(device)) in btrfs_parse_param()
369 return PTR_ERR(device); in btrfs_parse_param()
1607 struct btrfs_device *device; in btrfs_calc_avail_data_space() local
1650 list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) { in btrfs_calc_avail_data_space()
1652 &device->dev_state) || in btrfs_calc_avail_data_space()
1653 !device->bdev || in btrfs_calc_avail_data_space()
1654 test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) in btrfs_calc_avail_data_space()
1660 avail_space = device->total_bytes - device->bytes_used; in btrfs_calc_avail_data_space()
1674 devices_info[i].dev = device; in btrfs_calc_avail_data_space()
1841 struct btrfs_device *device; in btrfs_get_tree_super() local
1853 device = btrfs_scan_one_device(fc->source, true); in btrfs_get_tree_super()
1854 ASSERT(device != NULL); in btrfs_get_tree_super()
1855 if (IS_ERR(device)) { in btrfs_get_tree_super()
1857 return PTR_ERR(device); in btrfs_get_tree_super()
1859 fs_devices = device->fs_devices; in btrfs_get_tree_super()
2221 struct btrfs_device *device = NULL; in btrfs_control_ioctl() local
2242 device = btrfs_scan_one_device(vol->name, false); in btrfs_control_ioctl()
2243 ret = PTR_ERR_OR_ZERO(device); in btrfs_control_ioctl()
2260 device = btrfs_scan_one_device(vol->name, false); in btrfs_control_ioctl()
2261 if (IS_ERR_OR_NULL(device)) { in btrfs_control_ioctl()
2263 if (IS_ERR(device)) in btrfs_control_ioctl()
2264 ret = PTR_ERR(device); in btrfs_control_ioctl()
2269 ret = !(device->fs_devices->num_devices == in btrfs_control_ioctl()
2270 device->fs_devices->total_devices); in btrfs_control_ioctl()
2352 struct btrfs_device *device; in btrfs_unfreeze() local
2363 list_for_each_entry(device, &fs_info->fs_devices->devices, dev_list) { in btrfs_unfreeze()
2364 ret = check_dev_super(device); in btrfs_unfreeze()
2368 device->devid); in btrfs_unfreeze()