Lines Matching refs:src_device

604 	struct btrfs_device *src_device = NULL;  in btrfs_dev_replace_start()  local
606 src_device = btrfs_find_device_by_devspec(fs_info, srcdevid, in btrfs_dev_replace_start()
608 if (IS_ERR(src_device)) in btrfs_dev_replace_start()
609 return PTR_ERR(src_device); in btrfs_dev_replace_start()
611 if (btrfs_pinned_by_swapfile(fs_info, src_device)) { in btrfs_dev_replace_start()
614 btrfs_dev_name(src_device), src_device->devid); in btrfs_dev_replace_start()
632 src_device, &tgt_device); in btrfs_dev_replace_start()
636 ret = mark_block_group_to_copy(fs_info, src_device); in btrfs_dev_replace_start()
656 dev_replace->srcdev = src_device; in btrfs_dev_replace_start()
661 btrfs_dev_name(src_device), in btrfs_dev_replace_start()
662 src_device->devid, in btrfs_dev_replace_start()
709 ret = btrfs_scrub_dev(fs_info, src_device->devid, 0, in btrfs_dev_replace_start()
710 btrfs_device_get_total_bytes(src_device), in btrfs_dev_replace_start()
873 struct btrfs_device *src_device; in btrfs_dev_replace_finishing() local
892 src_device = dev_replace->srcdev; in btrfs_dev_replace_finishing()
925 if (!list_empty(&src_device->post_commit_list)) { in btrfs_dev_replace_finishing()
947 scrub_ret = btrfs_set_target_alloc_state(src_device, tgt_device); in btrfs_dev_replace_finishing()
951 src_device, in btrfs_dev_replace_finishing()
957 btrfs_dev_name(src_device), in btrfs_dev_replace_finishing()
958 src_device->devid, in btrfs_dev_replace_finishing()
975 btrfs_dev_name(src_device), in btrfs_dev_replace_finishing()
976 src_device->devid, in btrfs_dev_replace_finishing()
979 tgt_device->devid = src_device->devid; in btrfs_dev_replace_finishing()
980 src_device->devid = BTRFS_DEV_REPLACE_DEVID; in btrfs_dev_replace_finishing()
982 memcpy(tgt_device->uuid, src_device->uuid, sizeof(tgt_device->uuid)); in btrfs_dev_replace_finishing()
983 memcpy(src_device->uuid, uuid_tmp, sizeof(src_device->uuid)); in btrfs_dev_replace_finishing()
984 btrfs_device_set_total_bytes(tgt_device, src_device->total_bytes); in btrfs_dev_replace_finishing()
986 src_device->disk_total_bytes); in btrfs_dev_replace_finishing()
987 btrfs_device_set_bytes_used(tgt_device, src_device->bytes_used); in btrfs_dev_replace_finishing()
988 tgt_device->commit_bytes_used = src_device->bytes_used; in btrfs_dev_replace_finishing()
990 btrfs_assign_next_active_device(src_device, tgt_device); in btrfs_dev_replace_finishing()
999 btrfs_rm_dev_replace_remove_srcdev(src_device); in btrfs_dev_replace_finishing()
1020 btrfs_sysfs_remove_device(src_device); in btrfs_dev_replace_finishing()
1022 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &src_device->dev_state)) in btrfs_dev_replace_finishing()
1023 btrfs_scratch_superblocks(fs_info, src_device); in btrfs_dev_replace_finishing()
1032 btrfs_rm_dev_replace_free_srcdev(src_device); in btrfs_dev_replace_finishing()
1090 struct btrfs_device *src_device = NULL; in btrfs_dev_replace_cancel() local
1110 src_device = dev_replace->srcdev; in btrfs_dev_replace_cancel()
1123 btrfs_dev_name(src_device), src_device->devid, in btrfs_dev_replace_cancel()
1134 src_device = dev_replace->srcdev; in btrfs_dev_replace_cancel()
1157 btrfs_dev_name(src_device), src_device->devid, in btrfs_dev_replace_cancel()