Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_domain.c | 10 ++++------ src/qemu/qemu_domain.h | 3 +-- src/qemu/qemu_validate.c | 6 ++---- tests/qemublocktest.c | 4 ++-- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0839744660..8ac99a8cf7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4810,8 +4810,7 @@ qemuDomainValidateActualNetDef(const virDomainNetDef *net, int qemuDomainValidateStorageSource(virStorageSource *src, - virQEMUCaps *qemuCaps, - bool maskBlockdev G_GNUC_UNUSED) + virQEMUCaps *qemuCaps) { virStorageType actualType = virStorageSourceGetActualType(src); @@ -7721,8 +7720,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); @@ -10782,7 +10780,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); @@ -10820,7 +10818,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); diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 7dc720dcb8..abf245ec2a 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -997,8 +997,7 @@ qemuDomainPrepareDiskSourceData(virDomainDiskDef *disk, int qemuDomainValidateStorageSource(virStorageSource *src, - virQEMUCaps *qemuCaps, - bool maskBlockdev); + virQEMUCaps *qemuCaps); int diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 4ce920152f..af93588e49 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -648,7 +648,7 @@ qemuValidateDomainDefNvram(const virDomainDef *def, return -1; } - if (qemuDomainValidateStorageSource(src, qemuCaps, false) < 0) + if (qemuDomainValidateStorageSource(src, qemuCaps) < 0) return -1; return 0; @@ -3216,7 +3216,6 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk, virQEMUCaps *qemuCaps) { const char *driverName = virDomainDiskGetDriver(disk); - bool isSD = qemuDiskBusIsSD(disk->bus); virStorageSource *n; int idx; int partition; @@ -3259,8 +3258,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; } diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 57116c930b..1c1013d4d9 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -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) -- 2.36.1