qemuDomainGetStatsBlockExportFrontend: Remove return value

The function always returns 0. Remove return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2025-02-17 11:19:11 +01:00
parent b14968e6bd
commit 016fa9d73c

View File

@ -17332,7 +17332,7 @@ qemuDomainGetStatsBlockExportBackendStorage(const char *entryname,
} }
static int static void
qemuDomainGetStatsBlockExportFrontend(const char *frontendname, qemuDomainGetStatsBlockExportFrontend(const char *frontendname,
GHashTable *stats, GHashTable *stats,
size_t idx, size_t idx,
@ -17344,7 +17344,7 @@ qemuDomainGetStatsBlockExportFrontend(const char *frontendname,
* trying to refresh the stats from the disk. Inability to provide stats is * trying to refresh the stats from the disk. Inability to provide stats is
* usually caused by blocked storage so this would make libvirtd hang */ * usually caused by blocked storage so this would make libvirtd hang */
if (!stats || !frontendname || !(en = virHashLookup(stats, frontendname))) if (!stats || !frontendname || !(en = virHashLookup(stats, frontendname)))
return 0; return;
virTypedParamListAddULLong(par, en->rd_req, "block.%zu.rd.reqs", idx); virTypedParamListAddULLong(par, en->rd_req, "block.%zu.rd.reqs", idx);
virTypedParamListAddULLong(par, en->rd_bytes, "block.%zu.rd.bytes", idx); virTypedParamListAddULLong(par, en->rd_bytes, "block.%zu.rd.bytes", idx);
@ -17354,8 +17354,6 @@ qemuDomainGetStatsBlockExportFrontend(const char *frontendname,
virTypedParamListAddULLong(par, en->wr_total_times, "block.%zu.wr.times", idx); virTypedParamListAddULLong(par, en->wr_total_times, "block.%zu.wr.times", idx);
virTypedParamListAddULLong(par, en->flush_req, "block.%zu.fl.reqs", idx); virTypedParamListAddULLong(par, en->flush_req, "block.%zu.fl.reqs", idx);
virTypedParamListAddULLong(par, en->flush_total_times, "block.%zu.fl.times", idx); virTypedParamListAddULLong(par, en->flush_total_times, "block.%zu.fl.times", idx);
return 0;
} }
@ -17441,9 +17439,8 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDef *disk,
/* The following stats make sense only for the frontend device */ /* The following stats make sense only for the frontend device */
if (n == disk->src) { if (n == disk->src) {
if (qemuDomainGetStatsBlockExportFrontend(frontendalias, stats, *recordnr, qemuDomainGetStatsBlockExportFrontend(frontendalias, stats, *recordnr,
params) < 0) params);
return -1;
} }
if (qemuDomainGetStatsOneBlock(cfg, dom, params, if (qemuDomainGetStatsOneBlock(cfg, dom, params,