Lines Matching refs:src_device
317 struct btrfs_device *src_device = NULL; in btrfs_dev_replace_start() local
348 &src_device); in btrfs_dev_replace_start()
355 src_device, &tgt_device); in btrfs_dev_replace_start()
374 WARN_ON(!src_device); in btrfs_dev_replace_start()
375 dev_replace->srcdev = src_device; in btrfs_dev_replace_start()
381 src_device->missing ? "<missing disk>" : in btrfs_dev_replace_start()
382 rcu_str_deref(src_device->name), in btrfs_dev_replace_start()
383 src_device->devid, in btrfs_dev_replace_start()
415 ret = btrfs_scrub_dev(fs_info, src_device->devid, 0, in btrfs_dev_replace_start()
416 btrfs_device_get_total_bytes(src_device), in btrfs_dev_replace_start()
463 struct btrfs_device *src_device; in btrfs_dev_replace_finishing() local
482 src_device = dev_replace->srcdev; in btrfs_dev_replace_finishing()
520 src_device, in btrfs_dev_replace_finishing()
525 src_device->missing ? "<missing disk>" : in btrfs_dev_replace_finishing()
526 rcu_str_deref(src_device->name), in btrfs_dev_replace_finishing()
527 src_device->devid, in btrfs_dev_replace_finishing()
542 src_device->missing ? "<missing disk>" : in btrfs_dev_replace_finishing()
543 rcu_str_deref(src_device->name), in btrfs_dev_replace_finishing()
544 src_device->devid, in btrfs_dev_replace_finishing()
547 tgt_device->devid = src_device->devid; in btrfs_dev_replace_finishing()
548 src_device->devid = BTRFS_DEV_REPLACE_DEVID; in btrfs_dev_replace_finishing()
550 memcpy(tgt_device->uuid, src_device->uuid, sizeof(tgt_device->uuid)); in btrfs_dev_replace_finishing()
551 memcpy(src_device->uuid, uuid_tmp, sizeof(src_device->uuid)); in btrfs_dev_replace_finishing()
552 btrfs_device_set_total_bytes(tgt_device, src_device->total_bytes); in btrfs_dev_replace_finishing()
554 src_device->disk_total_bytes); in btrfs_dev_replace_finishing()
555 btrfs_device_set_bytes_used(tgt_device, src_device->bytes_used); in btrfs_dev_replace_finishing()
556 ASSERT(list_empty(&src_device->resized_list)); in btrfs_dev_replace_finishing()
557 tgt_device->commit_total_bytes = src_device->commit_total_bytes; in btrfs_dev_replace_finishing()
558 tgt_device->commit_bytes_used = src_device->bytes_used; in btrfs_dev_replace_finishing()
559 if (fs_info->sb->s_bdev == src_device->bdev) in btrfs_dev_replace_finishing()
561 if (fs_info->fs_devices->latest_bdev == src_device->bdev) in btrfs_dev_replace_finishing()
570 btrfs_rm_dev_replace_remove_srcdev(fs_info, src_device); in btrfs_dev_replace_finishing()
586 btrfs_kobj_rm_device(fs_info, src_device); in btrfs_dev_replace_finishing()
588 btrfs_rm_dev_replace_free_srcdev(fs_info, src_device); in btrfs_dev_replace_finishing()