Ping?
On 09/16/2014 01:06 PM, Shanzhi Yu wrote:
Since block-stream is not supported on qemu-kvm, so libvirt should
post more accurate error info when do blockpull with qemu-kvm but
not "Command 'block-stream' is not found"
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140981
Signed-off-by: Shanzhi Yu <shyu@xxxxxxxxxx>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_driver.c | 13 +++++--------
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 81ada48..5674f4f 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -269,6 +269,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"splash-timeout", /* 175 */
"iothread",
+ "block-stream",
);
@@ -1426,6 +1427,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
{ "query-spice", QEMU_CAPS_SPICE },
{ "query-kvm", QEMU_CAPS_KVM },
{ "block-commit", QEMU_CAPS_BLOCK_COMMIT },
+ { "block-stream", QEMU_CAPS_BLOCK_STREAM },
{ "query-vnc", QEMU_CAPS_VNC },
{ "drive-mirror", QEMU_CAPS_DRIVE_MIRROR },
{ "blockdev-snapshot-sync", QEMU_CAPS_DISK_SNAPSHOT },
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 0980c00..6701965 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -216,6 +216,7 @@ typedef enum {
QEMU_CAPS_RTC_RESET_REINJECTION = 174, /* rtc-reset-reinjection monitor command */
QEMU_CAPS_SPLASH_TIMEOUT = 175, /* -boot splash-time */
QEMU_CAPS_OBJECT_IOTHREAD = 176, /* -object iothread */
+ QEMU_CAPS_BLOCK_STREAM = 177, /* block-stream */
QEMU_CAPS_LAST, /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 73edda3..b38bc91 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14980,15 +14980,12 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("block jobs not supported with this QEMU binary"));
goto cleanup;
- } else if (base) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("partial block pull not supported with this "
- "QEMU binary"));
- goto cleanup;
- } else if (mode == BLOCK_JOB_PULL && bandwidth) {
+ }
+
+ if (mode == BLOCK_JOB_PULL &&
+ !(virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCK_STREAM))){
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("setting bandwidth at start of block pull not "
- "supported with this QEMU binary"));
+ _("block pull is not supported with this QEMU binary"));
goto cleanup;
}
--
Regards
shyu
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list