From 9ac3ea5cf80de9be37cf39cc57c12e95ed109a0a Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 10 Jul 2018 10:09:05 +0200 Subject: [PATCH] qemu: domain: Remove code assuming disk format probing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After commit c95f50cb021ea9a297 we always set a disk format in the post parse callback so the code that mandates use of explicit format for shareable disks no longer makes sense. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/qemu/qemu_domain.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 964fe97963..e29d01c828 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4642,20 +4642,12 @@ qemuDomainDeviceDefValidateDisk(const virDomainDiskDef *disk, const char *driverName = virDomainDiskGetDriver(disk); virStorageSourcePtr n; - if (disk->src->shared && !disk->src->readonly) { - if (disk->src->format <= VIR_STORAGE_FILE_AUTO) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shared access for disk '%s' requires use of " - "explicitly specified disk format"), disk->dst); - return -1; - } - - if (!qemuBlockStorageSourceSupportsConcurrentAccess(disk->src)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shared access for disk '%s' requires use of " - "supported storage format"), disk->dst); - return -1; - } + if (disk->src->shared && !disk->src->readonly && + !qemuBlockStorageSourceSupportsConcurrentAccess(disk->src)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("shared access for disk '%s' requires use of " + "supported storage format"), disk->dst); + return -1; } if (disk->geometry.cylinders > 0 && -- GitLab