Re: [PATCH 12/12] getstats: start crawling backing chain for qemu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/06/14 09:14, Eric Blake wrote:
> Wire up backing chain recursion.  Note that for now, we just use

...

> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c | 55 +++++++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 46 insertions(+), 9 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index feaa4a2..b57beeb 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c

...

> @@ -18550,8 +18566,16 @@ qemuDomainGetStatsOneBlock(virQEMUDriverPtr driver,
>      if (virStorageSourceIsLocalStorage(src) && src->path)
>          QEMU_ADD_NAME_PARAM(record, maxparams, "block", "path",
>                              block_idx, src->path);
> +    if (backing_idx)
> +        QEMU_ADD_BLOCK_PARAM_UI(record, maxparams, block_idx, "backingIndex",
> +                                backing_idx);
> 
> -    if (abbreviated || !disk->info.alias ||
> +    /* FIXME: qemu gives information on backing files, but we aren't
> +     * currently storing it into the stats table - we need a common
> +     * key in qemu_monitor_json.c:qemuMonitorGetAllBlockStatsInfo and
> +     * here for getting at that information, probably something like
> +     * asprintf("%s.%d", alias, backing_idx).  */


Breaks syntax-check:

src/qemu/qemu_driver.c:18577:     * asprintf("%s.%d", alias,
backing_idx).  */
maint.mk: use virAsprintf, not asprintf


> +    if (abbreviated || backing_idx || !disk->info.alias ||
>          !(entry = virHashLookup(stats, disk->info.alias))) {
>          if (qemuStorageLimitsRefresh(driver, cfg, dom,
>                                       disk, src, NULL, NULL) < 0)

Rest of review will follow in-order.

Peter

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]