[libvirt] [PATCH v3 07/16] numatune: Encapsulate numatune configuration in order to unify results

Roman Bogorodskiy bogorodskiy at gmail.com
Thu Jul 17 16:42:46 UTC 2014


  Martin Kletzander wrote:

> There were numerous places where numatune configuration (and thus
> domain config as well) was changed in different ways.  On some
> places this even resulted in persistent domain definition not to be
> stable (it would change with daemon's restart).
> 
> In order to uniformly change how numatune config is dealt with, all
> the internals are now accessible directly only in numatune_conf.c and
> outside this file accessors must be used.
> 
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
>  po/POTFILES.in                                     |   1 +
>  src/conf/domain_conf.c                             | 159 ++---------
>  src/conf/domain_conf.h                             |   8 +-
>  src/conf/numatune_conf.c                           | 318 +++++++++++++++++++++
>  src/conf/numatune_conf.h                           |  72 ++++-
>  src/libvirt_private.syms                           |  11 +
>  src/lxc/lxc_cgroup.c                               |  19 +-
>  src/lxc/lxc_controller.c                           |   5 +-
>  src/lxc/lxc_native.c                               |  15 +-
>  src/parallels/parallels_driver.c                   |   7 +-
>  src/qemu/qemu_cgroup.c                             |  23 +-
>  src/qemu/qemu_driver.c                             |  84 +++---
>  src/qemu/qemu_process.c                            |   8 +-
>  src/util/virnuma.c                                 |  48 ++--
>  src/util/virnuma.h                                 |   2 +-
>  .../qemuxml2argv-numatune-auto-prefer.xml          |  29 ++
>  .../qemuxml2xmlout-numatune-auto-prefer.xml        |  29 ++
>  tests/qemuxml2xmltest.c                            |   2 +
>  18 files changed, 555 insertions(+), 285 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.xml
>  create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-numatune-auto-prefer.xml

Looks like this breaks build with clang:

gmake[3]: Entering directory `/usr/home/novel/code/libvirt/src'
  CC       util/libvirt_util_la-virclosecallbacks.lo
In file included from util/virclosecallbacks.c:28:
In file included from ../src/util/virclosecallbacks.h:28:
../src/conf/domain_conf.h:70:35: error: redefinition of typedef 'virDomainNumatune' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef struct _virDomainNumatune virDomainNumatune;
                                  ^
../src/conf/numatune_conf.h:43:35: note: previous definition is here
typedef struct _virDomainNumatune virDomainNumatune;
                                  ^
In file included from util/virclosecallbacks.c:28:
In file included from ../src/util/virclosecallbacks.h:28:
../src/conf/domain_conf.h:71:28: error: redefinition of typedef 'virDomainNumatunePtr' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef virDomainNumatune *virDomainNumatunePtr;
                           ^
../src/conf/numatune_conf.h:44:28: note: previous definition is here
typedef virDomainNumatune *virDomainNumatunePtr;
                           ^
In file included from util/virclosecallbacks.c:28:
In file included from ../src/util/virclosecallbacks.h:28:
../src/conf/domain_conf.h:1857:30: error: redefinition of typedef 'virDomainDef' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef struct _virDomainDef virDomainDef;
                             ^
../src/conf/numatune_conf.h:39:30: note: previous definition is here
typedef struct _virDomainDef virDomainDef;
                             ^
In file included from util/virclosecallbacks.c:28:
In file included from ../src/util/virclosecallbacks.h:28:
../src/conf/domain_conf.h:1858:23: error: redefinition of typedef 'virDomainDefPtr' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef virDomainDef *virDomainDefPtr;
                      ^
../src/conf/numatune_conf.h:40:23: note: previous definition is here
typedef virDomainDef *virDomainDefPtr;
                      ^
4 errors generated.

Should we probably drop the repeating definitions from domain_conf.h as
we're including numatune_conf.h anyway?

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140717/fc1256cc/attachment-0001.sig>


More information about the libvir-list mailing list