[libvirt] [RFC PATCHv2 5/8] threshold: add qemu capability bit

Peter Krempa pkrempa at redhat.com
Mon Jun 15 13:33:44 UTC 2015


On Fri, Jun 12, 2015 at 13:29:29 -0600, Eric Blake wrote:
> Track whether qemu is new enough to do block thresholds on the
> active layer.  The plan is that even if qemu is too old, the
> event handler can still be registered, but will never fire (since

Well the event handler can be registered, but the API for setting the
actual threshold value should return failure in case when qemu does not
support it.

> it is useful to bulk-install handlers); while the request to set
> a threshold will honor the capability bit and fail up front if it
> is not possible.
> 
> FIXME:
> Note that qemu requires that libvirt use a node name and not a
> device name to actually use the feature.  What's more, a single
> qcow2 host resource results in two separate qemu nodes (one node
> for the guest view served by qcow2 protocol, the other node
> for the underlying host file access), so I'm working on a patch
> to qemu to automatically name all nodes (rather than having to
> hack up libvirt to supply two separate node names for a much
> more complex command line), at which point I'll need code in
> libvirt to probe the node name that got assigned by qemu.  So
> I may still need another capability bit for whether qemu is new
> enough to have the patch to auto-name all nodes.

Or perhaps just refuse to use this unless qemu is new enough to support
it?

> 
> * src/qemu/qemu_capabilities.h (QEMU_CAPS_BLOCK_WRITE_THRESHOLD):
> New bit.
> * src/qemu/qemu_capabilities.c (virQEMUCapsCommands): Enable it.
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  src/qemu/qemu_capabilities.c | 4 +++-
>  src/qemu/qemu_capabilities.h | 3 ++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150615/34c56b5e/attachment-0001.sig>


More information about the libvir-list mailing list