Lines Matching refs:tgt_device
609 struct btrfs_device *tgt_device = NULL;
638 src_device, &tgt_device);
662 dev_replace->tgtdev = tgt_device;
668 btrfs_dev_name(tgt_device));
686 ret = btrfs_sysfs_add_device(tgt_device);
725 btrfs_destroy_dev_replace_tgtdev(tgt_device);
856 struct btrfs_device *tgt_device;
875 tgt_device = dev_replace->tgtdev;
931 scrub_ret = btrfs_set_target_alloc_state(src_device, tgt_device);
936 tgt_device);
943 btrfs_dev_name(tgt_device), scrub_ret);
949 if (tgt_device)
950 btrfs_destroy_dev_replace_tgtdev(tgt_device);
961 btrfs_dev_name(tgt_device));
962 clear_bit(BTRFS_DEV_STATE_REPLACE_TGT, &tgt_device->dev_state);
963 tgt_device->devid = src_device->devid;
965 memcpy(uuid_tmp, tgt_device->uuid, sizeof(uuid_tmp));
966 memcpy(tgt_device->uuid, src_device->uuid, sizeof(tgt_device->uuid));
968 btrfs_device_set_total_bytes(tgt_device, src_device->total_bytes);
969 btrfs_device_set_disk_total_bytes(tgt_device,
971 btrfs_device_set_bytes_used(tgt_device, src_device->bytes_used);
972 tgt_device->commit_bytes_used = src_device->bytes_used;
974 btrfs_assign_next_active_device(src_device, tgt_device);
976 list_add(&tgt_device->dev_alloc_list, &fs_devices->alloc_list);
990 atomic_inc(&tgt_device->dev_stats_ccnt);
1004 btrfs_sysfs_update_devid(tgt_device);
1073 struct btrfs_device *tgt_device = NULL;
1093 tgt_device = dev_replace->tgtdev;
1108 btrfs_dev_name(tgt_device));
1117 tgt_device = dev_replace->tgtdev;
1142 btrfs_dev_name(tgt_device));
1144 if (tgt_device)
1145 btrfs_destroy_dev_replace_tgtdev(tgt_device);