提交 a6eeda98 编写于 作者: P Peter Krempa

qemuDomainValidateStorageSource: Reject unsupported slices

We support explicit storage slices only when using blockdev. Storage
slices expressed via the backing store string are left to qemu to
open correctly.

Reject storage slices configured via the XML for non-blockdev usage.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 c4818812
...@@ -6862,6 +6862,18 @@ qemuDomainValidateStorageSource(virStorageSourcePtr src, ...@@ -6862,6 +6862,18 @@ qemuDomainValidateStorageSource(virStorageSourcePtr src,
return -1; return -1;
} }
if (src->sliceStorage) {
/* In pre-blockdev era we can't configure the slice so we can allow them
* only for detected backing store entries as they are populated
* from a place that qemu would be able to read */
if (!src->detected &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("storage slice is not supported by this QEMU binary"));
return -1;
}
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册