* @driver: driver object
* @vm: domain object
* @path: to gather the statistics for
- * @capacity: refresh capacity of the backing image
* @retstats: returns pointer to structure holding the stats
*
* Gathers the block statistics for use in qemuDomainBlockStats* APIs.
static int
qemuDomainBlocksStatsGather(virDomainObj *vm,
const char *path,
- bool capacity,
qemuBlockStats **retstats)
{
qemuDomainObjPrivate *priv = vm->privateData;
qemuDomainObjEnterMonitor(vm);
nstats = qemuMonitorGetAllBlockStatsInfo(priv->mon, &blockstats);
-
- if (capacity && nstats >= 0)
- rc = qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, blockstats);
-
qemuDomainObjExitMonitor(vm);
if (nstats < 0 || rc < 0)
if (virDomainObjCheckActive(vm) < 0)
goto endjob;
- if (qemuDomainBlocksStatsGather(vm, path, false, &blockstats) < 0)
+ if (qemuDomainBlocksStatsGather(vm, path, &blockstats) < 0)
goto endjob;
if (VIR_ASSIGN_IS_OVERFLOW(stats->rd_req, blockstats->rd_req) ||
if (virDomainObjCheckActive(vm) < 0)
goto endjob;
- if ((nstats = qemuDomainBlocksStatsGather(vm, path, false,
- &blockstats)) < 0)
+ if ((nstats = qemuDomainBlocksStatsGather(vm, path, &blockstats)) < 0)
goto endjob;
/* return count of supported stats */
goto endjob;
}
- if (qemuDomainBlocksStatsGather(vm, path, true, &entry) < 0)
+ if (qemuDomainBlocksStatsGather(vm, path, &entry) < 0)
goto endjob;
if (!entry->wr_highest_offset_valid) {
rc = qemuMonitorGetAllBlockStatsInfo(priv->mon, &stats);
- if (rc >= 0)
- rc = qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, stats);
-
qemuDomainObjExitMonitor(dom);
/* failure to retrieve stats is fine at this point */