]> xenbits.xensource.com Git - libvirt.git/commit
src/hypervisor: introduce domain_driver.c
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 17 Feb 2020 21:29:16 +0000 (16:29 -0500)
committerJán Tomko <jtomko@redhat.com>
Sun, 23 Feb 2020 13:02:23 +0000 (14:02 +0100)
commit8595948bc855bc5fb65c8362a5e5832a30f97f7e
treebbf0868340b49e6b5f13b2b25c53da9c022a908d
parente039341cf2b78a4c9d55492443cc886692788610
src/hypervisor: introduce domain_driver.c

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@gmail.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
po/POTFILES.in
src/hypervisor/Makefile.inc.am
src/hypervisor/domain_driver.c [new file with mode: 0644]
src/hypervisor/domain_driver.h [new file with mode: 0644]
src/libvirt_private.syms
src/lxc/lxc_driver.c
src/qemu/qemu_driver.c