qemuDomainGetStatsOneBlockFallback: 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 924805d29c
commit e5b0612021

View File

@ -17242,22 +17242,20 @@ qemuDomainGetStatsInterface(virQEMUDriver *driver G_GNUC_UNUSED,
#undef QEMU_ADD_NET_PARAM #undef QEMU_ADD_NET_PARAM
/* refresh information by opening images on the disk */ /* refresh information by opening images on the disk */
static int static void
qemuDomainGetStatsOneBlockFallback(virQEMUDriverConfig *cfg, qemuDomainGetStatsOneBlockFallback(virQEMUDriverConfig *cfg,
virDomainObj *dom, virDomainObj *dom,
virTypedParamList *params, virTypedParamList *params,
virStorageSource *src, virStorageSource *src,
size_t block_idx) size_t block_idx)
{ {
if (virStorageSourceIsEmpty(src)) if (virStorageSourceIsEmpty(src) ||
return 0; virStorageSourceIsFD(src))
return;
if (virStorageSourceIsFD(src))
return 0;
if (qemuStorageLimitsRefresh(cfg, dom, src, true) <= 0) { if (qemuStorageLimitsRefresh(cfg, dom, src, true) <= 0) {
virResetLastError(); virResetLastError();
return 0; return;
} }
if (src->allocation) if (src->allocation)
@ -17268,8 +17266,6 @@ qemuDomainGetStatsOneBlockFallback(virQEMUDriverConfig *cfg,
if (src->physical) if (src->physical)
virTypedParamListAddULLong(params, src->physical, "block.%zu.physical", block_idx); virTypedParamListAddULLong(params, src->physical, "block.%zu.physical", block_idx);
return 0;
} }
@ -17287,8 +17283,8 @@ qemuDomainGetStatsOneBlock(virQEMUDriverConfig *cfg,
/* the VM is offline so we have to go and load the stast from the disk by /* the VM is offline so we have to go and load the stast from the disk by
* ourselves */ * ourselves */
if (!virDomainObjIsActive(dom)) { if (!virDomainObjIsActive(dom)) {
return qemuDomainGetStatsOneBlockFallback(cfg, dom, params, qemuDomainGetStatsOneBlockFallback(cfg, dom, params, src, block_idx);
src, block_idx); return 0;
} }
/* In case where qemu didn't provide the stats we stop here rather than /* In case where qemu didn't provide the stats we stop here rather than