Lines Matching refs:src_device

595 	struct btrfs_device *src_device = NULL;  in btrfs_dev_replace_start()  local
597 src_device = btrfs_find_device_by_devspec(fs_info, srcdevid, in btrfs_dev_replace_start()
599 if (IS_ERR(src_device)) in btrfs_dev_replace_start()
600 return PTR_ERR(src_device); in btrfs_dev_replace_start()
602 if (btrfs_pinned_by_swapfile(fs_info, src_device)) { in btrfs_dev_replace_start()
605 btrfs_dev_name(src_device), src_device->devid); in btrfs_dev_replace_start()
623 src_device, &tgt_device); in btrfs_dev_replace_start()
627 ret = mark_block_group_to_copy(fs_info, src_device); in btrfs_dev_replace_start()
647 dev_replace->srcdev = src_device; in btrfs_dev_replace_start()
652 btrfs_dev_name(src_device), in btrfs_dev_replace_start()
653 src_device->devid, in btrfs_dev_replace_start()
700 ret = btrfs_scrub_dev(fs_info, src_device->devid, 0, in btrfs_dev_replace_start()
701 btrfs_device_get_total_bytes(src_device), in btrfs_dev_replace_start()
864 struct btrfs_device *src_device; in btrfs_dev_replace_finishing() local
883 src_device = dev_replace->srcdev; in btrfs_dev_replace_finishing()
916 if (!list_empty(&src_device->post_commit_list)) { in btrfs_dev_replace_finishing()
938 scrub_ret = btrfs_set_target_alloc_state(src_device, tgt_device); in btrfs_dev_replace_finishing()
942 src_device, in btrfs_dev_replace_finishing()
948 btrfs_dev_name(src_device), in btrfs_dev_replace_finishing()
949 src_device->devid, in btrfs_dev_replace_finishing()
966 btrfs_dev_name(src_device), in btrfs_dev_replace_finishing()
967 src_device->devid, in btrfs_dev_replace_finishing()
970 tgt_device->devid = src_device->devid; in btrfs_dev_replace_finishing()
971 src_device->devid = BTRFS_DEV_REPLACE_DEVID; in btrfs_dev_replace_finishing()
973 memcpy(tgt_device->uuid, src_device->uuid, sizeof(tgt_device->uuid)); in btrfs_dev_replace_finishing()
974 memcpy(src_device->uuid, uuid_tmp, sizeof(src_device->uuid)); in btrfs_dev_replace_finishing()
975 btrfs_device_set_total_bytes(tgt_device, src_device->total_bytes); in btrfs_dev_replace_finishing()
977 src_device->disk_total_bytes); in btrfs_dev_replace_finishing()
978 btrfs_device_set_bytes_used(tgt_device, src_device->bytes_used); in btrfs_dev_replace_finishing()
979 tgt_device->commit_bytes_used = src_device->bytes_used; in btrfs_dev_replace_finishing()
981 btrfs_assign_next_active_device(src_device, tgt_device); in btrfs_dev_replace_finishing()
990 btrfs_rm_dev_replace_remove_srcdev(src_device); in btrfs_dev_replace_finishing()
1011 btrfs_sysfs_remove_device(src_device); in btrfs_dev_replace_finishing()
1013 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &src_device->dev_state)) in btrfs_dev_replace_finishing()
1014 btrfs_scratch_superblocks(fs_info, src_device); in btrfs_dev_replace_finishing()
1023 btrfs_rm_dev_replace_free_srcdev(src_device); in btrfs_dev_replace_finishing()
1081 struct btrfs_device *src_device = NULL; in btrfs_dev_replace_cancel() local
1101 src_device = dev_replace->srcdev; in btrfs_dev_replace_cancel()
1114 btrfs_dev_name(src_device), src_device->devid, in btrfs_dev_replace_cancel()
1125 src_device = dev_replace->srcdev; in btrfs_dev_replace_cancel()
1148 btrfs_dev_name(src_device), src_device->devid, in btrfs_dev_replace_cancel()