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