Lines Matching refs:src_device
316 struct btrfs_device *src_device = NULL; in btrfs_dev_replace_start() local
334 &src_device); in btrfs_dev_replace_start()
341 src_device, &tgt_device); in btrfs_dev_replace_start()
373 WARN_ON(!src_device); in btrfs_dev_replace_start()
374 dev_replace->srcdev = src_device; in btrfs_dev_replace_start()
380 src_device->missing ? "<missing disk>" : in btrfs_dev_replace_start()
381 rcu_str_deref(src_device->name), in btrfs_dev_replace_start()
382 src_device->devid, in btrfs_dev_replace_start()
418 ret = btrfs_scrub_dev(fs_info, src_device->devid, 0, in btrfs_dev_replace_start()
419 btrfs_device_get_total_bytes(src_device), in btrfs_dev_replace_start()
465 struct btrfs_device *src_device; in btrfs_dev_replace_finishing() local
484 src_device = dev_replace->srcdev; in btrfs_dev_replace_finishing()
510 if (src_device->has_pending_chunks) { in btrfs_dev_replace_finishing()
531 src_device, in btrfs_dev_replace_finishing()
536 src_device->missing ? "<missing disk>" : in btrfs_dev_replace_finishing()
537 rcu_str_deref(src_device->name), in btrfs_dev_replace_finishing()
538 src_device->devid, in btrfs_dev_replace_finishing()
553 src_device->missing ? "<missing disk>" : in btrfs_dev_replace_finishing()
554 rcu_str_deref(src_device->name), in btrfs_dev_replace_finishing()
555 src_device->devid, in btrfs_dev_replace_finishing()
558 tgt_device->devid = src_device->devid; in btrfs_dev_replace_finishing()
559 src_device->devid = BTRFS_DEV_REPLACE_DEVID; in btrfs_dev_replace_finishing()
561 memcpy(tgt_device->uuid, src_device->uuid, sizeof(tgt_device->uuid)); in btrfs_dev_replace_finishing()
562 memcpy(src_device->uuid, uuid_tmp, sizeof(src_device->uuid)); in btrfs_dev_replace_finishing()
563 btrfs_device_set_total_bytes(tgt_device, src_device->total_bytes); in btrfs_dev_replace_finishing()
565 src_device->disk_total_bytes); in btrfs_dev_replace_finishing()
566 btrfs_device_set_bytes_used(tgt_device, src_device->bytes_used); in btrfs_dev_replace_finishing()
567 ASSERT(list_empty(&src_device->resized_list)); in btrfs_dev_replace_finishing()
568 tgt_device->commit_total_bytes = src_device->commit_total_bytes; in btrfs_dev_replace_finishing()
569 tgt_device->commit_bytes_used = src_device->bytes_used; in btrfs_dev_replace_finishing()
570 if (fs_info->sb->s_bdev == src_device->bdev) in btrfs_dev_replace_finishing()
572 if (fs_info->fs_devices->latest_bdev == src_device->bdev) in btrfs_dev_replace_finishing()
581 btrfs_rm_dev_replace_remove_srcdev(fs_info, src_device); in btrfs_dev_replace_finishing()
603 btrfs_sysfs_rm_device_link(fs_info->fs_devices, src_device); in btrfs_dev_replace_finishing()
604 btrfs_rm_dev_replace_free_srcdev(fs_info, src_device); in btrfs_dev_replace_finishing()