<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div class="gmail_default" style="font-size:large">Polite ping.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 11, 2021 at 12:49 PM Nikolay Shirokovskiy <<a href="mailto:nshirokovskiy@virtuozzo.com">nshirokovskiy@virtuozzo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, all.<br>
<br>
I started this work as adding missing parts/fixing issues/etc in block iotune<br>
code but then turned to refactoring code. We use a lot of macros in this place<br>
and if we get rid of them I belive we will have much more readable/reusable/<br>
extendable code.<br>
<br>
Most of macros usage is for iterating over unsigned long long values. I'm<br>
talking about parsing/formating xml, converting from/to virTypedParameterPtr<br>
list etc. These places do not care about tune semantics and thus we can<br>
add tools for the said iteration. See patch [1] for the first such conversion.<br>
<br>
Patches before it partially prepare for this conversion, partially just<br>
improve code reuse and add missing parts.<br>
<br>
The work on removing macros in code handling iotunes is not finished as<br>
I wanted to get an approvement that I have taken a right direction. At the<br>
same time series shows the potential of the approach (take a look on how<br>
qemuDomainSetBlockIoTune and testDomainSetBlockIoTune are looking now!).<br>
<br>
Some places like qemuDomainSetBlockIoTuneDefaults deal with fields semantics.<br>
So we need another approach to remove macros there but it is a matter of<br>
a different RFC.<br>
<br>
Nikolay Shirokovskiy (23):<br>
  qemu: pass supportGroupNameOption as expected<br>
  qemu: factor out qemuValidateDomainBlkdeviotune<br>
  qemu: reuse validation in qemuDomainSetBlockIoTune<br>
  qemu: remove extra check for QEMU_BLOCK_IOTUNE_MAX<br>
  conf: factor out virDomainBlockIoTuneValidate<br>
  qemu: reuse virDomainBlockIoTuneValidate<br>
  test driver: reuse virDomainBlockIoTuneValidate<br>
  qemu: reset max iotune setting when needed<br>
  qemu: add max iotune settings check to virDomainBlockIoTuneValidate<br>
  qemu: remove iotune max checks<br>
  test driver: remove iotune max checks<br>
  qemu: prepare for removing qemuBlockIoTuneSetFlags<br>
  qemu: use group_name instead of QEMU_BLOCK_IOTUNE_SET_GROUP_NAME<br>
  qemu: remove qemuBlockIoTuneSetFlags usage in qemuDomainSetBlockIoTune<br>
  qemu: remove qemuBlockIoTuneSetFlags enum completly<br>
  conf: get rid of macros in virDomainDiskDefIotuneParse                    [1]<br>
  conf: get rid of macros in virDomainDiskDefFormatIotune<br>
  conf: add virDomainBlockIoTuneFromParams<br>
  conf: add virDomainBlockIoTuneToEventParams<br>
  qemu: qemuDomainSetBlockIoTune use functions to convert to/from params<br>
  test driver: remove TEST_BLOCK_IOTUNE_MAX checks<br>
  test driver: prepare to delete macros in testDomainSetBlockIoTune<br>
  test driver: testDomainSetBlockIoTune: use functions to convert<br>
    to/from params<br>
<br>
 src/conf/domain_conf.c   | 303 +++++++++++++++++++++++++++++++++--------------<br>
 src/conf/domain_conf.h   |  16 +++<br>
 src/libvirt_private.syms |   3 +<br>
 src/qemu/qemu_driver.c   | 281 ++++++++++++-------------------------------<br>
 src/qemu/qemu_validate.c | 100 +++++++++-------<br>
 src/qemu/qemu_validate.h |   4 +<br>
 src/test/test_driver.c   | 156 ++----------------------<br>
 7 files changed, 380 insertions(+), 483 deletions(-)<br>
<br>
-- <br>
1.8.3.1<br>
<br>
</blockquote></div>