1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

qemuBlockStorageSourceAttachData: Add field for ad-hoc storage node name

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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-06-19 16:47:08 +02:00
parent 4f28b1a51c
commit 0489a7c6ee
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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;