mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
qemu: driver: Stop using QEMU_ADD_BLOCK_PARAM_ULL in qemuDomainGetStatsBlockExportFrontend
The macro now became unused so it was deleted. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d4dcfdf7a3
commit
1bdf20c9df
@ -21349,10 +21349,6 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
#undef QEMU_ADD_NET_PARAM
|
#undef QEMU_ADD_NET_PARAM
|
||||||
|
|
||||||
#define QEMU_ADD_BLOCK_PARAM_ULL(params, num, name, value) \
|
|
||||||
if (virTypedParamListAddULLong((params), (value), "block.%zu.%s", (num), (name)) < 0) \
|
|
||||||
goto cleanup
|
|
||||||
|
|
||||||
/* refresh information by opening images on the disk */
|
/* refresh information by opening images on the disk */
|
||||||
static int
|
static int
|
||||||
qemuDomainGetStatsOneBlockFallback(virQEMUDriverPtr driver,
|
qemuDomainGetStatsOneBlockFallback(virQEMUDriverPtr driver,
|
||||||
@ -21498,32 +21494,28 @@ qemuDomainGetStatsBlockExportBackendStorage(const char *entryname,
|
|||||||
static int
|
static int
|
||||||
qemuDomainGetStatsBlockExportFrontend(const char *frontendname,
|
qemuDomainGetStatsBlockExportFrontend(const char *frontendname,
|
||||||
virHashTablePtr stats,
|
virHashTablePtr stats,
|
||||||
size_t recordnr,
|
size_t idx,
|
||||||
virTypedParamListPtr params)
|
virTypedParamListPtr par)
|
||||||
{
|
{
|
||||||
qemuBlockStats *entry;
|
qemuBlockStats *en;
|
||||||
int ret = -1;
|
|
||||||
|
|
||||||
/* 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
|
||||||
* 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 || !(entry = virHashLookup(stats, frontendname))) {
|
if (!stats || !frontendname || !(en = virHashLookup(stats, frontendname)))
|
||||||
ret = 0;
|
return 0;
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "rd.reqs", entry->rd_req);
|
if (virTypedParamListAddULLong(par, en->rd_req, "block.%zu.rd.reqs", idx) < 0 ||
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "rd.bytes", entry->rd_bytes);
|
virTypedParamListAddULLong(par, en->rd_bytes, "block.%zu.rd.bytes", idx) < 0 ||
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "rd.times", entry->rd_total_times);
|
virTypedParamListAddULLong(par, en->rd_total_times, "block.%zu.rd.times", idx) < 0 ||
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "wr.reqs", entry->wr_req);
|
virTypedParamListAddULLong(par, en->wr_req, "block.%zu.wr.reqs", idx) < 0 ||
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "wr.bytes", entry->wr_bytes);
|
virTypedParamListAddULLong(par, en->wr_bytes, "block.%zu.wr.bytes", idx) < 0 ||
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "wr.times", entry->wr_total_times);
|
virTypedParamListAddULLong(par, en->wr_total_times, "block.%zu.wr.times", idx) < 0 ||
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "fl.reqs", entry->flush_req);
|
virTypedParamListAddULLong(par, en->flush_req, "block.%zu.fl.reqs", idx) < 0 ||
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "fl.times", entry->flush_total_times);
|
virTypedParamListAddULLong(par, en->flush_total_times, "block.%zu.fl.times", idx) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -21714,7 +21706,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr driver,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef QEMU_ADD_BLOCK_PARAM_ULL
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainGetStatsIOThread(virQEMUDriverPtr driver,
|
qemuDomainGetStatsIOThread(virQEMUDriverPtr driver,
|
||||||
|
Loading…
Reference in New Issue
Block a user