Lines Matching refs:fs_devices
104 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace()
166 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace()
177 dev_replace->tgtdev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_init_dev_replace()
179 dev_replace->srcdev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_init_dev_replace()
219 WARN_ON(fs_info->fs_devices->rw_devices == 0); in btrfs_init_dev_replace()
246 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_init_dev_replace_tgtdev() local
254 if (srcdev->fs_devices->seeding) { in btrfs_init_dev_replace_tgtdev()
275 list_for_each_entry(device, &fs_devices->devices, dev_list) { in btrfs_init_dev_replace_tgtdev()
327 device->fs_devices = fs_devices; in btrfs_init_dev_replace_tgtdev()
333 mutex_lock(&fs_devices->device_list_mutex); in btrfs_init_dev_replace_tgtdev()
334 list_add(&device->dev_list, &fs_devices->devices); in btrfs_init_dev_replace_tgtdev()
335 fs_devices->num_devices++; in btrfs_init_dev_replace_tgtdev()
336 fs_devices->open_devices++; in btrfs_init_dev_replace_tgtdev()
337 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_init_dev_replace_tgtdev()
853 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_dev_replace_finishing() local
903 mutex_lock(&fs_devices->device_list_mutex); in btrfs_dev_replace_finishing()
908 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_dev_replace_finishing()
945 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_dev_replace_finishing()
974 list_add(&tgt_device->dev_alloc_list, &fs_devices->alloc_list); in btrfs_dev_replace_finishing()
975 fs_devices->rw_devices++; in btrfs_dev_replace_finishing()
998 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_dev_replace_finishing()