提交 9ac3ea5c 编写于 作者: P Peter Krempa

qemu: domain: Remove code assuming disk format probing

After commit c95f50cb 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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 767f9e14
......@@ -4642,21 +4642,13 @@ 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)) {
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 &&
disk->geometry.heads > 0 &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册