From: John Ferlan Date: Thu, 1 Dec 2016 16:41:34 +0000 (-0500) Subject: qemu: Introduce helper qemuDomainStorageUpdatePhysical X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a7fea19fcd0f4923cca21345c811e9eae96589d6;p=libvirt.git qemu: Introduce helper qemuDomainStorageUpdatePhysical Currently just a shim to call virStorageSourceUpdateBlockPhysicalSize Signed-off-by: John Ferlan --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a3db623727..a0ec209a09 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11610,6 +11610,14 @@ qemuDomainStorageCloseStat(virStorageSourcePtr src, } +static int +qemuDomainStorageUpdatePhysical(virStorageSourcePtr src, + bool report) +{ + return virStorageSourceUpdateBlockPhysicalSize(src, report); +} + + /** * @driver: qemu driver data * @cfg: driver configuration data @@ -11833,7 +11841,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom, if (entry->physical) { info->physical = entry->physical; } else { - if (virStorageSourceUpdateBlockPhysicalSize(disk->src, true) < 0) + if (qemuDomainStorageUpdatePhysical(disk->src, true) < 0) goto endjob; info->physical = disk->src->physical; @@ -19437,7 +19445,7 @@ qemuDomainGetStatsOneBlock(virQEMUDriverPtr driver, QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx, "physical", entry->physical); } else { - if (virStorageSourceUpdateBlockPhysicalSize(src, false) == 0) { + if (qemuDomainStorageUpdatePhysical(src, false) == 0) { QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx, "physical", src->physical); }