On 09/12/14 05:55, Eric Blake wrote:
> Upstream qemu 1.4 added some drive-mirror tunables not present
> when it was first introduced in 1.3.  Management apps may want
> to set these in some cases (for example, without tuning
> granularity down to sector size, a copy may end up occupying
> more bytes than the original because an entire cluster is
> copied even when only a sector within the cluster is dirty,
> although tuning it down results in more CPU time to do the
> copy).  I haven't personally needed to use the parameters, but
> since they exist, and since the new API supports virTypedParams,
> we might as well expose them.
> 
> Since the tuning parameters aren't often used, and omitted from
> the QMP command when unspecified, I think it is safe to rely on
> qemu 1.3 to issue an error about them being unsupported, rather
> than trying to create a new capability bit in libvirt.
> 
> Meanwhile, all versions of qemu from 1.4 to 2.1 have a bug where
> a bad granularity (such as non-power-of-2) gives a poor message:
> error: internal error: unable to execute QEMU command 'drive-mirror': Invalid 
> parameter 'drive-virtio-disk0'
> 
> because of abuse of QERR_INVALID_PARAMETER (which is supposed to
> name the parameter that was given a bad value, rather than the
> value passed to some other parameter).  I don't see that a
> capability check will help, so we'll just live with it (and it
> has since been improved in upstream qemu).
> 
> * src/qemu/qemu_monitor.h (qemuMonitorDriveMirror): Add
> parameters.
> * src/qemu/qemu_monitor.c (qemuMonitorDriveMirror): Likewise.
> * src/qemu/qemu_monitor_json.h (qemuMonitorJSONDriveMirror):
> Likewise.
> * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDriveMirror):
> Likewise.
> * src/qemu/qemu_driver.c (qemuDomainBlockCopyCommon): Likewise.
> (qemuDomainBlockRebase, qemuDomainBlockCopy): Adjust callers.
> * src/qemu/qemu_migration.c (qemuMigrationDriveMirror): Likewise.
> * tests/qemumonitorjsontest.c (qemuMonitorJSONDriveMirror): Likewise.
> 
> Signed-off-by: Eric Blake <ebl...@redhat.com>
> ---
>  src/qemu/qemu_driver.c       | 18 +++++-------------
>  src/qemu/qemu_migration.c    |  2 +-
>  src/qemu/qemu_monitor.c      |  8 +++++---
>  src/qemu/qemu_monitor.h      |  2 ++
>  src/qemu/qemu_monitor_json.c |  4 ++++
>  src/qemu/qemu_monitor_json.h |  2 ++
>  tests/qemumonitorjsontest.c  |  2 +-
>  7 files changed, 20 insertions(+), 18 deletions(-)
> 

ACK,

Peter


Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to