mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Introduce helper qemuDomainStorageUpdatePhysical
Currently just a shim to call virStorageSourceUpdateBlockPhysicalSize Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
732af77cce
commit
a7fea19fcd
@ -11610,6 +11610,14 @@ qemuDomainStorageCloseStat(virStorageSourcePtr src,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
qemuDomainStorageUpdatePhysical(virStorageSourcePtr src,
|
||||||
|
bool report)
|
||||||
|
{
|
||||||
|
return virStorageSourceUpdateBlockPhysicalSize(src, report);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @driver: qemu driver data
|
* @driver: qemu driver data
|
||||||
* @cfg: driver configuration data
|
* @cfg: driver configuration data
|
||||||
@ -11833,7 +11841,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom,
|
|||||||
if (entry->physical) {
|
if (entry->physical) {
|
||||||
info->physical = entry->physical;
|
info->physical = entry->physical;
|
||||||
} else {
|
} else {
|
||||||
if (virStorageSourceUpdateBlockPhysicalSize(disk->src, true) < 0)
|
if (qemuDomainStorageUpdatePhysical(disk->src, true) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
info->physical = disk->src->physical;
|
info->physical = disk->src->physical;
|
||||||
@ -19437,7 +19445,7 @@ qemuDomainGetStatsOneBlock(virQEMUDriverPtr driver,
|
|||||||
QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx,
|
QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx,
|
||||||
"physical", entry->physical);
|
"physical", entry->physical);
|
||||||
} else {
|
} else {
|
||||||
if (virStorageSourceUpdateBlockPhysicalSize(src, false) == 0) {
|
if (qemuDomainStorageUpdatePhysical(src, false) == 0) {
|
||||||
QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx,
|
QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx,
|
||||||
"physical", src->physical);
|
"physical", src->physical);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user