Re: [PATCH v2 09/14] src/hypervisor: introduce domain_driver.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 17, 2020 at 04:29:16PM -0500, Daniel Henrique Barboza wrote:
lxcDomainMergeBlkioDevice() and qemuDomainMergeBlkioDevice()
are the same functions. This duplicated code can't be put in
the existing domain_cgroup.c since it's not cgroup related.

This patch introduces a new src/hypervisor/domain_driver.c to
host this more generic code that can be shared between virt
drivers. This new file is then used to create a new helper
called virDomainDeivceMergeBlkioDevice() to eliminate the code
repetition mentioned above. Callers in LXC and QEMU files
were updated.

This change is a preliminary step for more code reduction of
cgroup related code inside lxcDomainSetBlkioParameters() and
qemuDomainSetBlkioParameters().

Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
src/hypervisor/Makefile.inc.am |  2 +
src/hypervisor/domain_driver.c | 96 ++++++++++++++++++++++++++++++++++
src/hypervisor/domain_driver.h | 29 ++++++++++
src/libvirt_private.syms       |  4 ++
src/lxc/lxc_driver.c           | 84 ++++-------------------------
src/qemu/qemu_driver.c         | 83 ++++-------------------------
6 files changed, 149 insertions(+), 149 deletions(-)
create mode 100644 src/hypervisor/domain_driver.c
create mode 100644 src/hypervisor/domain_driver.h


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux