On Tue, Jul 26, 2022 at 04:37:16PM +0200, Peter Krempa wrote:
> This function and it's callees were a bit more entangled so remove the
> pre-blockdev code separately.
> 
> Signed-off-by: Peter Krempa <pkre...@redhat.com>
> ---
>  src/qemu/qemu_driver.c | 80 +++++++-----------------------------------
>  1 file changed, 12 insertions(+), 68 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index e7b0acd46f..811b4a610c 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c

[...]

> @@ -18403,20 +18367,15 @@ 
> qemuDomainGetStatsBlockExportHeader(virDomainDiskDef *disk,
>  static int
>  qemuDomainGetStatsBlockExportDisk(virDomainDiskDef *disk,
>                                    GHashTable *stats,
> -                                  GHashTable *nodestats,
>                                    virTypedParamList *params,
>                                    size_t *recordnr,
>                                    bool visitBacking,
>                                    virQEMUDriver *driver,
>                                    virQEMUDriverConfig *cfg,
> -                                  virDomainObj *dom,
> -                                  bool blockdev)
> +                                  virDomainObj *dom)
> 
>  {
>      virStorageSource *n;
> -    const char *frontendalias;
> -    const char *backendalias;
> -    const char *backendstoragealias;
> 
>      /*
>       * This helps to keep logs clean from error messages on getting stats
> @@ -18452,9 +18411,10 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDef 
> *disk,
> 
>      for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
>          g_autofree char *alias = NULL;
> +        const char *frontendalias;
> +        const char *backendalias;
> +        const char *backendstoragealias;

This code movement seems to be unrelated.

> -        /* for 'sd' disks we won't be displaying stats for the backing chain
> -         * as we don't update the stats correctly */
>          if (QEMU_DOMAIN_DISK_PRIVATE(disk)->qomName) {
>              frontendalias = QEMU_DOMAIN_DISK_PRIVATE(disk)->qomName;
>              backendalias = n->nodeformat;
> @@ -18465,7 +18425,8 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDef 
> *disk,
>                  !(alias = qemuDomainStorageAlias(disk->info.alias, n->id)))
>                  return -1;
> 
> -            qemuDomainGetStatsOneBlockRefreshNamed(n, alias, stats, 
> nodestats);
> +            /* for 'sd' disks we won't be displaying stats for the backing 
> chain
> +             * as we don't update the stats correctly */

Same for the comment movement.

>              frontendalias = alias;
>              backendalias = alias;

Reviewed-by: Pavel Hrdina <phrd...@redhat.com>

Attachment: signature.asc
Description: PGP signature

Reply via email to