On 06/17/2014 03:06 PM, Daniel P. Berrange wrote:
On Tue, Jun 17, 2014 at 03:03:36PM +0200, Ján Tomko wrote:
> Reuse the common code from LXC and QEMU drivers.
> ---
> src/conf/domain_conf.c | 383 +++++++++++++++++++++++++++++++++++++++++++++++
> src/conf/domain_conf.h | 8 +
> src/libvirt_private.syms | 1 +
> src/lxc/lxc_driver.c | 374 +--------------------------------------------
> src/qemu/qemu_driver.c | 383 +----------------------------------------------
> 5 files changed, 400 insertions(+), 749 deletions(-)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 4114289..4fe7cb6 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -19777,3 +19777,386 @@ virDomainObjSetMetadata(virDomainObjPtr vm,
>
> return 0;
> }
> +
> +#define CONF_NB_BLKIO_PARAM 6
> +
> +int
> +virDomainGetBlkioParametersInternal(virCgroupPtr cgroup,
> + virDomainDefPtr def,
> + virDomainDefPtr persistentDef,
> + virTypedParameterPtr params,
> + int *nparams,
> + unsigned int flags)
This kind of code really does not belong in domain_config.c - it is
nothing at all todo with domain XML parsing / formatting, and is very
much Linux specific
My first choice was util/vircgroup.c, but including domain_conf.h there felt
wrong.
Jan