[libvirt] [PATCH 3/3] qemu: stats: Display the block threshold size in bulk stats

Peter Krempa pkrempa at redhat.com
Fri Mar 24 14:51:00 UTC 2017


On Fri, Mar 24, 2017 at 09:45:14 -0500, Eric Blake wrote:
> On 03/16/2017 10:29 AM, Peter Krempa wrote:
> > Management tools may want to check whether the threshold is still set if
> > they missed an event. Add the data to the bulk stats API where they can
> > also query the current backing size at the same time.
> 
> Another way of reading it: the presence of the threshold in the bulk
> stats means the event has NOT fired yet. If the threshold is absent,
> either it was never registered, or an event was missed and a (new)
> threshold needs to be registered.
> 
> > ---
> >  src/libvirt-domain.c   |  4 ++++
> >  src/qemu/qemu_driver.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++---
> >  tools/virsh.pod        |  3 +++
> >  3 files changed, 55 insertions(+), 3 deletions(-)
> > 
> > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> > index fd367bcb0..815cbb1e1 100644
> > --- a/src/libvirt-domain.c
> > +++ b/src/libvirt-domain.c
> > @@ -11206,6 +11206,10 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
> >   *                              backing image as unsigned long long.
> >   *     "block.<num>.physical" - physical size in bytes of the container of the
> >   *                              backing image as unsigned long long.
> > + *     "block.<num>.threshold.storage - current threshold for delivering the
> 
> Rather long name; would block.<num>.threshold be sufficient?

I don't mind shortening it. I chose to add the suffix if for some reason
any user would want to add a threshold for the guest offset (offset in
the qcow2 write). I don't know if it makes sense though.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170324/7cc8fc8a/attachment-0001.sig>


More information about the libvir-list mailing list