On 28.11.2012 00:41, Eric Blake wrote:
> This will be used with new migration scheme.
> This patch creates basically just monitor stub
> functions. Wiring them into something useful
> is done in later patches.
> ---
> src/qemu/qemu_monitor.c | 21 +++++++++++++++++++++
> src/qemu/qemu_monitor.h | 2 ++
> src/qemu/qemu_monitor_json.c | 23 +++++++++++++++++++++++
> src/qemu/qemu_monitor_json.h | 2 ++
> 4 files changed, 48 insertions(+), 0 deletions(-)
>
> +
> +int
> +qemuMonitorJSONNBDServerAdd(qemuMonitorPtr mon,
> + const char *deviceID)
> +{
> + int ret = -1;
> + virJSONValuePtr cmd;
> + virJSONValuePtr reply = NULL;
> +
> + if (!(cmd = qemuMonitorJSONMakeCommand("nbd-server-add",
> + "s:device", deviceID,
> + NULL)))
According to qemu.git, 'writable' is optional, but if omitted, it
defaults to false. But doesn't storage migration require 'writable'
to be true in order for drive-mirror on the source to be able to
actually write into the destination?
[You may have dealt with this later in the series, but even if so,
I still think this stub should be doing something with "b:writable".]
Ah, there's a bug in qemu; qapi-schema.json tells the default is false,
however blockdev-nbd.c sets default to false. That would explain why it
worked even without explicitly setting this argument.
Anyway, I'll update my patch. Meanwhile, I've posted a qemu patch:
http://lists.nongnu.org/archive/html/qemu-devel/2012-11/msg03133.html
Michal