[libvirt] [PATCH 1/2] vircgroup: Add virCgroupSetupBlkiotune()

Michal Privoznik mprivozn at redhat.com
Tue Jun 5 14:16:36 UTC 2018


On 06/03/2018 08:09 PM, Fabiano Fidêncio wrote:
> virCgroupSetupBlkiotune() has been introduced in order to remove the
> code duplication present between virLXCCgroupSetupBlkioTune() and
> qemuSetupBlkioCgroup().
> 
> Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
> ---
>  src/libvirt_private.syms |  1 +
>  src/lxc/lxc_cgroup.c     | 49 +------------------------------------------
>  src/qemu/qemu_cgroup.c   | 47 +----------------------------------------
>  src/util/vircgroup.c     | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
>  src/util/vircgroup.h     |  3 +++
>  5 files changed, 60 insertions(+), 94 deletions(-)
> 


> diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
> index d833927678..bd7e7c6d70 100644
> --- a/src/util/vircgroup.h
> +++ b/src/util/vircgroup.h
> @@ -27,6 +27,7 @@
>  
>  # include "virutil.h"
>  # include "virbitmap.h"
> +# include "conf/domain_conf.h"

I don't think we want to do this. The point of this code separation is
to use src/util/ independently of parsing code (even though we break
this rule in two places: src/util/virhostdev.h and
src/util/virclosecallbacks.h).

What we can do is moving virDomainBlkiotunePtr into vircgroup.h (in
which case it will need renaming too).

Michal




More information about the libvir-list mailing list