All (proper) callers pass true so we can remove the argument.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 4 ++--
src/qemu/qemu_monitor.c | 13 ++++---------
src/qemu/qemu_monitor.h | 3 +--
src/qemu/qemu_monitor_json.c | 15 +++++----------
src/qemu/qemu_monitor_json.h | 3 +--
tests/qemumonitorjsontest.c | 2 +-
6 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 822fd99ae2..587a673efc 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10051,7 +10051,7 @@ qemuDomainBlocksStatsGather(virQEMUDriver *driver,
}
qemuDomainObjEnterMonitor(driver, vm);
- nstats = qemuMonitorGetAllBlockStatsInfo(priv->mon, &blockstats, true);
+ nstats = qemuMonitorGetAllBlockStatsInfo(priv->mon, &blockstats);
if (capacity && nstats >= 0) {
if (blockdev)
@@ -18477,7 +18477,7 @@ qemuDomainGetStatsBlock(virQEMUDriver *driver,
if (HAVE_JOB(privflags) && virDomainObjIsActive(dom)) {
qemuDomainObjEnterMonitor(driver, dom);
- rc = qemuMonitorGetAllBlockStatsInfo(priv->mon, &stats, true);
+ rc = qemuMonitorGetAllBlockStatsInfo(priv->mon, &stats);
if (rc >= 0) {
if (blockdev)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index e8accaf2b0..166f7958f0 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -2056,27 +2056,22 @@ qemuMonitorQueryBlockstats(qemuMonitor *mon)
* qemuMonitorGetAllBlockStatsInfo:
* @mon: monitor object
* @ret_stats: pointer that is filled with a hash table containing the stats
- * @backingChain: recurse into the backing chain of devices
*
- * Creates a hash table in @ret_stats with block stats of all devices. In case
- * @backingChain is true @ret_stats will additionally contain stats for
- * backing chain members of block devices.
+ * Creates a hash table in @ret_stats with block stats of all devices and the
+ * backing chains for the block devices.
*
* Returns < 0 on error, count of supported block stats fields on success.
*/
int
qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon,
- GHashTable **ret_stats,
- bool backingChain)
+ GHashTable **ret_stats)
{
int ret;
g_autoptr(GHashTable) stats = virHashNew(g_free);
- VIR_DEBUG("ret_stats=%p, backing=%d", ret_stats, backingChain);
-
QEMU_CHECK_MONITOR(mon);
- ret = qemuMonitorJSONGetAllBlockStatsInfo(mon, stats, backingChain);
+ ret = qemuMonitorJSONGetAllBlockStatsInfo(mon, stats);
if (ret < 0)
return -1;
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 52ff34d316..e28d45cc4a 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -738,8 +738,7 @@ struct _qemuBlockStats {
};
int qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon,
- GHashTable **ret_stats,
- bool backingChain)
+ GHashTable **ret_stats)
ATTRIBUTE_NONNULL(2);
int qemuMonitorBlockStatsUpdateCapacity(qemuMonitor *mon,
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 6cf36d2518..af673b5ba6 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -2469,8 +2469,7 @@ static int
qemuMonitorJSONGetOneBlockStatsInfo(virJSONValue *dev,
const char *dev_name,
int depth,
- GHashTable *hash,
- bool backingChain)
+ GHashTable *hash)
{
g_autofree qemuBlockStats *bstats = NULL;
int nstats = 0;
@@ -2507,10 +2506,8 @@ qemuMonitorJSONGetOneBlockStatsInfo(virJSONValue *dev,
qemuMonitorJSONAddOneBlockStatsInfo(bstats, nodename, hash) < 0)
return -1;
- if (backingChain &&
- (backing = virJSONValueObjectGetObject(dev, "backing")) &&
- qemuMonitorJSONGetOneBlockStatsInfo(backing, dev_name, depth + 1,
- hash, true) < 0)
+ if ((backing = virJSONValueObjectGetObject(dev, "backing")) &&
+ qemuMonitorJSONGetOneBlockStatsInfo(backing, dev_name, depth + 1, hash) < 0)
return -1;
return nstats;
@@ -2538,8 +2535,7 @@ qemuMonitorJSONQueryBlockstats(qemuMonitor *mon)
int
qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon,
- GHashTable *hash,
- bool backingChain)
+ GHashTable *hash)
{
int nstats = 0;
int rc;
@@ -2570,8 +2566,7 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon,
if (*dev_name == '\0')
dev_name = NULL;
- rc = qemuMonitorJSONGetOneBlockStatsInfo(dev, dev_name, 0, hash,
- backingChain);
+ rc = qemuMonitorJSONGetOneBlockStatsInfo(dev, dev_name, 0, hash);
if (rc < 0)
return -1;
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index c841de0a03..c60f079d06 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -77,8 +77,7 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitor *mon,
virJSONValue *qemuMonitorJSONQueryBlockstats(qemuMonitor *mon);
int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon,
- GHashTable *hash,
- bool backingChain);
+ GHashTable *hash);
int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitor *mon,
GHashTable *stats,
bool backingChain);
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 30a19d27e8..e5ba39cd2f 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -1657,7 +1657,7 @@ testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo(const void
*opaque)
CHECK0FULL(wr_highest_offset_valid, WR_HIGHEST_OFFSET_VALID, "%d",
"%d")
if (qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitorTestGetMonitor(test),
- blockstats, false) < 0)
+ blockstats) < 0)
return -1;
if (!blockstats) {
--
2.31.1