SCSI hostdevs don't have a virStorageSource associated with the backend
in certain cases. Adding a separate field to hold memory for a copy of
the nodename of the storage backend will allow reusing the blockdev
machinery also for SCSI hostdevs.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_block.c | 1 +
src/qemu/qemu_block.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index bdd07d9925..34406aa743 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -1557,6 +1557,7 @@
qemuBlockStorageSourceAttachDataFree(qemuBlockStorageSourceAttachDataPtr data)
virJSONValueFree(data->encryptsecretProps);
virJSONValueFree(data->tlsProps);
virJSONValueFree(data->tlsKeySecretProps);
+ VIR_FREE(data->storageNodeNameCopy);
VIR_FREE(data->tlsAlias);
VIR_FREE(data->tlsKeySecretAlias);
VIR_FREE(data->authsecretAlias);
diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
index 0701fc18d1..9aab620947 100644
--- a/src/qemu/qemu_block.h
+++ b/src/qemu/qemu_block.h
@@ -85,6 +85,7 @@ struct qemuBlockStorageSourceAttachData {
virJSONValuePtr storageProps;
const char *storageNodeName;
+ char *storageNodeNameCopy; /* in some cases we don't have the corresponding
storage source */
bool storageAttached;
virJSONValuePtr storageSliceProps;
--
2.26.2