mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 12:05: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
|
||||
qemuDomainValidateStorageSource(virStorageSource *src,
|
||||
virQEMUCaps *qemuCaps,
|
||||
bool maskBlockdev G_GNUC_UNUSED)
|
||||
virQEMUCaps *qemuCaps)
|
||||
{
|
||||
virStorageType actualType = virStorageSourceGetActualType(src);
|
||||
|
||||
@ -7636,8 +7635,7 @@ qemuDomainDetermineDiskChain(virQEMUDriver *driver,
|
||||
if (n->format == VIR_STORAGE_FILE_ISO)
|
||||
n->format = VIR_STORAGE_FILE_RAW;
|
||||
|
||||
/* mask-out blockdev for 'sd' disks */
|
||||
if (qemuDomainValidateStorageSource(n, priv->qemuCaps, isSD) < 0)
|
||||
if (qemuDomainValidateStorageSource(n, priv->qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
qemuDomainPrepareStorageSourceConfig(n, cfg);
|
||||
@ -10685,7 +10683,7 @@ qemuDomainPrepareDiskSourceLegacy(virDomainDiskDef *disk,
|
||||
qemuDomainObjPrivate *priv,
|
||||
virQEMUDriverConfig *cfg)
|
||||
{
|
||||
if (qemuDomainValidateStorageSource(disk->src, priv->qemuCaps, true) < 0)
|
||||
if (qemuDomainValidateStorageSource(disk->src, priv->qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
qemuDomainPrepareStorageSourceConfig(disk->src, cfg);
|
||||
@ -10723,7 +10721,7 @@ qemuDomainPrepareStorageSourceBlockdevNodename(virDomainDiskDef *disk,
|
||||
if (src->encryption && src->encryption->engine == VIR_STORAGE_ENCRYPTION_ENGINE_DEFAULT)
|
||||
src->encryption->engine = VIR_STORAGE_ENCRYPTION_ENGINE_QEMU;
|
||||
|
||||
if (qemuDomainValidateStorageSource(src, priv->qemuCaps, false) < 0)
|
||||
if (qemuDomainValidateStorageSource(src, priv->qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
qemuDomainPrepareStorageSourceConfig(src, cfg);
|
||||
|
@ -990,8 +990,7 @@ qemuDomainPrepareDiskSourceData(virDomainDiskDef *disk,
|
||||
|
||||
int
|
||||
qemuDomainValidateStorageSource(virStorageSource *src,
|
||||
virQEMUCaps *qemuCaps,
|
||||
bool maskBlockdev);
|
||||
virQEMUCaps *qemuCaps);
|
||||
|
||||
|
||||
int
|
||||
|
@ -746,7 +746,7 @@ qemuValidateDomainDefNvram(const virDomainDef *def,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (qemuDomainValidateStorageSource(src, qemuCaps, false) < 0)
|
||||
if (qemuDomainValidateStorageSource(src, qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
@ -3349,7 +3349,6 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk,
|
||||
virQEMUCaps *qemuCaps)
|
||||
{
|
||||
const char *driverName = virDomainDiskGetDriver(disk);
|
||||
bool isSD = qemuDiskBusIsSD(disk->bus);
|
||||
virStorageSource *n;
|
||||
int idx;
|
||||
int partition;
|
||||
@ -3392,8 +3391,7 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk,
|
||||
}
|
||||
|
||||
for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||
/* blockdev support is masked out for 'sd' disks */
|
||||
if (qemuDomainValidateStorageSource(n, qemuCaps, isSD) < 0)
|
||||
if (qemuDomainValidateStorageSource(n, qemuCaps) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ testQemuDiskXMLToProps(const void *opaque)
|
||||
if (testQemuDiskXMLToJSONFakeSecrets(n) < 0)
|
||||
return -1;
|
||||
|
||||
if (qemuDomainValidateStorageSource(n, data->qemuCaps, false) < 0)
|
||||
if (qemuDomainValidateStorageSource(n, data->qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
qemuDomainPrepareDiskSourceData(disk, n);
|
||||
@ -519,7 +519,7 @@ testQemuImageCreate(const void *opaque)
|
||||
src->capacity = UINT_MAX * 2ULL;
|
||||
src->physical = UINT_MAX + 1ULL;
|
||||
|
||||
if (qemuDomainValidateStorageSource(src, data->qemuCaps, false) < 0)
|
||||
if (qemuDomainValidateStorageSource(src, data->qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
if (qemuBlockStorageSourceCreateGetStorageProps(src, &protocolprops) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user