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()
522 src_device, in btrfs_dev_replace_finishing()
527 src_device->missing ? "<missing disk>" : in btrfs_dev_replace_finishing()
528 rcu_str_deref(src_device->name), in btrfs_dev_replace_finishing()
529 src_device->devid, in btrfs_dev_replace_finishing()
544 src_device->missing ? "<missing disk>" : in btrfs_dev_replace_finishing()
545 rcu_str_deref(src_device->name), in btrfs_dev_replace_finishing()
546 src_device->devid, in btrfs_dev_replace_finishing()
549 tgt_device->devid = src_device->devid; in btrfs_dev_replace_finishing()
550 src_device->devid = BTRFS_DEV_REPLACE_DEVID; in btrfs_dev_replace_finishing()
552 memcpy(tgt_device->uuid, src_device->uuid, sizeof(tgt_device->uuid)); in btrfs_dev_replace_finishing()
553 memcpy(src_device->uuid, uuid_tmp, sizeof(src_device->uuid)); in btrfs_dev_replace_finishing()
554 btrfs_device_set_total_bytes(tgt_device, src_device->total_bytes); in btrfs_dev_replace_finishing()
556 src_device->disk_total_bytes); in btrfs_dev_replace_finishing()
557 btrfs_device_set_bytes_used(tgt_device, src_device->bytes_used); in btrfs_dev_replace_finishing()
558 ASSERT(list_empty(&src_device->resized_list)); in btrfs_dev_replace_finishing()
559 tgt_device->commit_total_bytes = src_device->commit_total_bytes; in btrfs_dev_replace_finishing()
560 tgt_device->commit_bytes_used = src_device->bytes_used; in btrfs_dev_replace_finishing()
561 if (fs_info->sb->s_bdev == src_device->bdev) in btrfs_dev_replace_finishing()
563 if (fs_info->fs_devices->latest_bdev == src_device->bdev) in btrfs_dev_replace_finishing()
572 btrfs_rm_dev_replace_remove_srcdev(fs_info, src_device); in btrfs_dev_replace_finishing()
588 btrfs_sysfs_rm_device_link(fs_info->fs_devices, src_device); in btrfs_dev_replace_finishing()
589 btrfs_rm_dev_replace_free_srcdev(fs_info, src_device); in btrfs_dev_replace_finishing()