Lines Matching refs:device
1171 struct btrfs_device *device = NULL; in btrfs_parse_device_options() local
1201 device = btrfs_scan_one_device(device_name, flags, in btrfs_parse_device_options()
1204 if (IS_ERR(device)) { in btrfs_parse_device_options()
1205 error = PTR_ERR(device); in btrfs_parse_device_options()
1754 struct btrfs_device *device = NULL; in btrfs_mount_root() local
1799 device = btrfs_scan_one_device(device_name, mode, fs_type); in btrfs_mount_root()
1800 if (IS_ERR(device)) { in btrfs_mount_root()
1802 error = PTR_ERR(device); in btrfs_mount_root()
1806 fs_devices = device->fs_devices; in btrfs_mount_root()
2225 struct btrfs_device *device; in btrfs_calc_avail_data_space() local
2268 list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) { in btrfs_calc_avail_data_space()
2270 &device->dev_state) || in btrfs_calc_avail_data_space()
2271 !device->bdev || in btrfs_calc_avail_data_space()
2272 test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) in btrfs_calc_avail_data_space()
2278 avail_space = device->total_bytes - device->bytes_used; in btrfs_calc_avail_data_space()
2292 devices_info[i].dev = device; in btrfs_calc_avail_data_space()
2491 struct btrfs_device *device = NULL; in btrfs_control_ioctl() local
2506 device = btrfs_scan_one_device(vol->name, FMODE_READ, in btrfs_control_ioctl()
2508 ret = PTR_ERR_OR_ZERO(device); in btrfs_control_ioctl()
2521 device = btrfs_scan_one_device(vol->name, FMODE_READ, in btrfs_control_ioctl()
2523 if (IS_ERR(device)) { in btrfs_control_ioctl()
2525 ret = PTR_ERR(device); in btrfs_control_ioctl()
2528 ret = !(device->fs_devices->num_devices == in btrfs_control_ioctl()
2529 device->fs_devices->total_devices); in btrfs_control_ioctl()
2618 struct btrfs_device *device; in btrfs_unfreeze() local
2629 list_for_each_entry(device, &fs_info->fs_devices->devices, dev_list) { in btrfs_unfreeze()
2630 ret = check_dev_super(device); in btrfs_unfreeze()
2634 device->devid); in btrfs_unfreeze()