lib: s/free-page-reporting/freePageReporting/

In fee8a61d29 a new attribute to <memballoon/> was introduced:
free-page-reporting. We don't really like hyphens in attribute
names. Use camelCase instead.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Michal Privoznik 2020-10-14 16:46:12 +02:00
parent 9ba99180b3
commit 76db9e8bcd
6 changed files with 10 additions and 10 deletions

View File

@ -6755,8 +6755,8 @@ Example: manually added device with static PCI slot 2 requested
release some memory at the last moment before a guest's process get killed by release some memory at the last moment before a guest's process get killed by
Out of Memory killer. :since:`Since 1.3.1, QEMU and KVM only` Out of Memory killer. :since:`Since 1.3.1, QEMU and KVM only`
``free-page-reporting`` ``freePageReporting``
The optional ``free-page-reporting`` attribute allows to enable/disable The optional ``freePageReporting`` attribute allows to enable/disable
("on"/"off", respectively) the ability of the QEMU virtio memory balloon to ("on"/"off", respectively) the ability of the QEMU virtio memory balloon to
return unused pages back to the hypervisor to be used by other guests or return unused pages back to the hypervisor to be used by other guests or
processes. :since:`Since 6.9.0, QEMU and KVM only` processes. :since:`Since 6.9.0, QEMU and KVM only`

View File

@ -4540,7 +4540,7 @@
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<attribute name="free-page-reporting"> <attribute name="freePageReporting">
<ref name="virOnOff"/> <ref name="virOnOff"/>
</attribute> </attribute>
</optional> </optional>

View File

@ -15361,10 +15361,10 @@ virDomainMemballoonDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error; goto error;
} }
if ((freepage_reporting = virXMLPropString(node, "free-page-reporting")) && if ((freepage_reporting = virXMLPropString(node, "freePageReporting")) &&
(def->free_page_reporting = virTristateSwitchTypeFromString(freepage_reporting)) <= 0) { (def->free_page_reporting = virTristateSwitchTypeFromString(freepage_reporting)) <= 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid free-page-reporting attribute value '%s'"), freepage_reporting); _("invalid freePageReporting attribute value '%s'"), freepage_reporting);
goto error; goto error;
} }
@ -23548,7 +23548,7 @@ virDomainMemballoonDefCheckABIStability(virDomainMemballoonDefPtr src,
if (src->free_page_reporting != dst->free_page_reporting) { if (src->free_page_reporting != dst->free_page_reporting) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target balloon free-page-reporting attribute value " _("Target balloon freePageReporting attribute value "
"'%s' does not match source '%s'"), "'%s' does not match source '%s'"),
virTristateSwitchTypeToString(dst->free_page_reporting), virTristateSwitchTypeToString(dst->free_page_reporting),
virTristateSwitchTypeToString(src->free_page_reporting)); virTristateSwitchTypeToString(src->free_page_reporting));
@ -27662,7 +27662,7 @@ virDomainMemballoonDefFormat(virBufferPtr buf,
virTristateSwitchTypeToString(def->autodeflate)); virTristateSwitchTypeToString(def->autodeflate));
if (def->free_page_reporting != VIR_TRISTATE_SWITCH_ABSENT) if (def->free_page_reporting != VIR_TRISTATE_SWITCH_ABSENT)
virBufferAsprintf(&attrBuf, " free-page-reporting='%s'", virBufferAsprintf(&attrBuf, " freePageReporting='%s'",
virTristateSwitchTypeToString(def->free_page_reporting)); virTristateSwitchTypeToString(def->free_page_reporting));
if (def->period) if (def->period)

View File

@ -3934,7 +3934,7 @@ qemuValidateDomainDeviceDefMemballoon(const virDomainMemballoonDef *memballoon,
if (memballoon->free_page_reporting != VIR_TRISTATE_SWITCH_ABSENT && if (memballoon->free_page_reporting != VIR_TRISTATE_SWITCH_ABSENT &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BALLOON_FREE_PAGE_REPORTING)) { !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BALLOON_FREE_PAGE_REPORTING)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("free-page-reporting is not supported by this QEMU binary")); _("freePageReporting is not supported by this QEMU binary"));
return -1; return -1;
} }

View File

@ -1 +1 @@
unsupported configuration: free-page-reporting is not supported by this QEMU binary unsupported configuration: freePageReporting is not supported by this QEMU binary

View File

@ -15,7 +15,7 @@
<devices> <devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator> <emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='pci' index='0' model='pci-root'/> <controller type='pci' index='0' model='pci-root'/>
<memballoon model='virtio' free-page-reporting='on'> <memballoon model='virtio' freePageReporting='on'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</memballoon> </memballoon>
</devices> </devices>