mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemuDomainValidateStorageSource: Remove 'maskBlockdev' argument
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a60d76fc37
commit
1050d80585
@ -4719,8 +4719,7 @@ qemuDomainValidateActualNetDef(const virDomainNetDef *net,
|
|||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainValidateStorageSource(virStorageSource *src,
|
qemuDomainValidateStorageSource(virStorageSource *src,
|
||||||
virQEMUCaps *qemuCaps,
|
virQEMUCaps *qemuCaps)
|
||||||
bool maskBlockdev G_GNUC_UNUSED)
|
|
||||||
{
|
{
|
||||||
virStorageType actualType = virStorageSourceGetActualType(src);
|
virStorageType actualType = virStorageSourceGetActualType(src);
|
||||||
|
|
||||||
@ -7636,8 +7635,7 @@ qemuDomainDetermineDiskChain(virQEMUDriver *driver,
|
|||||||
if (n->format == VIR_STORAGE_FILE_ISO)
|
if (n->format == VIR_STORAGE_FILE_ISO)
|
||||||
n->format = VIR_STORAGE_FILE_RAW;
|
n->format = VIR_STORAGE_FILE_RAW;
|
||||||
|
|
||||||
/* mask-out blockdev for 'sd' disks */
|
if (qemuDomainValidateStorageSource(n, priv->qemuCaps) < 0)
|
||||||
if (qemuDomainValidateStorageSource(n, priv->qemuCaps, isSD) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
qemuDomainPrepareStorageSourceConfig(n, cfg);
|
qemuDomainPrepareStorageSourceConfig(n, cfg);
|
||||||
@ -10685,7 +10683,7 @@ qemuDomainPrepareDiskSourceLegacy(virDomainDiskDef *disk,
|
|||||||
qemuDomainObjPrivate *priv,
|
qemuDomainObjPrivate *priv,
|
||||||
virQEMUDriverConfig *cfg)
|
virQEMUDriverConfig *cfg)
|
||||||
{
|
{
|
||||||
if (qemuDomainValidateStorageSource(disk->src, priv->qemuCaps, true) < 0)
|
if (qemuDomainValidateStorageSource(disk->src, priv->qemuCaps) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
qemuDomainPrepareStorageSourceConfig(disk->src, cfg);
|
qemuDomainPrepareStorageSourceConfig(disk->src, cfg);
|
||||||
@ -10723,7 +10721,7 @@ qemuDomainPrepareStorageSourceBlockdevNodename(virDomainDiskDef *disk,
|
|||||||
if (src->encryption && src->encryption->engine == VIR_STORAGE_ENCRYPTION_ENGINE_DEFAULT)
|
if (src->encryption && src->encryption->engine == VIR_STORAGE_ENCRYPTION_ENGINE_DEFAULT)
|
||||||
src->encryption->engine = VIR_STORAGE_ENCRYPTION_ENGINE_QEMU;
|
src->encryption->engine = VIR_STORAGE_ENCRYPTION_ENGINE_QEMU;
|
||||||
|
|
||||||
if (qemuDomainValidateStorageSource(src, priv->qemuCaps, false) < 0)
|
if (qemuDomainValidateStorageSource(src, priv->qemuCaps) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
qemuDomainPrepareStorageSourceConfig(src, cfg);
|
qemuDomainPrepareStorageSourceConfig(src, cfg);
|
||||||
|
@ -990,8 +990,7 @@ qemuDomainPrepareDiskSourceData(virDomainDiskDef *disk,
|
|||||||
|
|
||||||
int
|
int
|
||||||
qemuDomainValidateStorageSource(virStorageSource *src,
|
qemuDomainValidateStorageSource(virStorageSource *src,
|
||||||
virQEMUCaps *qemuCaps,
|
virQEMUCaps *qemuCaps);
|
||||||
bool maskBlockdev);
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -746,7 +746,7 @@ qemuValidateDomainDefNvram(const virDomainDef *def,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainValidateStorageSource(src, qemuCaps, false) < 0)
|
if (qemuDomainValidateStorageSource(src, qemuCaps) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -3349,7 +3349,6 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk,
|
|||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
const char *driverName = virDomainDiskGetDriver(disk);
|
const char *driverName = virDomainDiskGetDriver(disk);
|
||||||
bool isSD = qemuDiskBusIsSD(disk->bus);
|
|
||||||
virStorageSource *n;
|
virStorageSource *n;
|
||||||
int idx;
|
int idx;
|
||||||
int partition;
|
int partition;
|
||||||
@ -3392,8 +3391,7 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||||
/* blockdev support is masked out for 'sd' disks */
|
if (qemuDomainValidateStorageSource(n, qemuCaps) < 0)
|
||||||
if (qemuDomainValidateStorageSource(n, qemuCaps, isSD) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ testQemuDiskXMLToProps(const void *opaque)
|
|||||||
if (testQemuDiskXMLToJSONFakeSecrets(n) < 0)
|
if (testQemuDiskXMLToJSONFakeSecrets(n) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuDomainValidateStorageSource(n, data->qemuCaps, false) < 0)
|
if (qemuDomainValidateStorageSource(n, data->qemuCaps) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
qemuDomainPrepareDiskSourceData(disk, n);
|
qemuDomainPrepareDiskSourceData(disk, n);
|
||||||
@ -519,7 +519,7 @@ testQemuImageCreate(const void *opaque)
|
|||||||
src->capacity = UINT_MAX * 2ULL;
|
src->capacity = UINT_MAX * 2ULL;
|
||||||
src->physical = UINT_MAX + 1ULL;
|
src->physical = UINT_MAX + 1ULL;
|
||||||
|
|
||||||
if (qemuDomainValidateStorageSource(src, data->qemuCaps, false) < 0)
|
if (qemuDomainValidateStorageSource(src, data->qemuCaps) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuBlockStorageSourceCreateGetStorageProps(src, &protocolprops) < 0)
|
if (qemuBlockStorageSourceCreateGetStorageProps(src, &protocolprops) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user