In many places we store bitmap info in a chunk of data
(pointed to by a char *), and have redundant codes to
set/unset bits. This series extends virBitmap, and convert
those codes to use virBitmap.
changes:
v4:
- rename virBitmapAlloc to virBitmapNew
- rename virBitmapAllocFromData to virBitmapNewData
v3:
- renaming member variables of virBitmap
- rewrite virBitmapFormat using virBitmapNextSetBit
- store bits in machine native endian format
- more tests of virBitmap
v2:
- fix bug in qemuSetupCgroupForEmulator
- new function virBitmapNextSetBit
- virBitmapcmp -> virBitmapEqual
- virBitmap: store bits in little endian format
- some improvements of virBitmap
- fix some memory leaks
Hu Tao (9):
bitmap: new member variable and function renaming
New functions for virBitmap
use virBitmap to store cpupin info
use virBitmap to store cpu affinity info
use virBitmap to store numa nodemask info.
use virBitmap to store cpumask info.
use virBitmap to store cells' cpumask info.
use virBitmap to store nodeinfo.
remove virDomainCpuSetFormat and virDomainCpuSetParse
.gitignore | 1 +
src/conf/cpu_conf.c | 17 +-
src/conf/cpu_conf.h | 3 +-
src/conf/domain_conf.c | 394 ++++++----------------------------
src/conf/domain_conf.h | 18 +-
src/conf/snapshot_conf.c | 2 +-
src/libvirt_private.syms | 16 +-
src/lxc/lxc_controller.c | 56 +++--
src/nodeinfo.c | 26 +--
src/nodeinfo.h | 6 +-
src/parallels/parallels_driver.c | 5 +-
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_cgroup.c | 10 +-
src/qemu/qemu_cgroup.h | 2 +-
src/qemu/qemu_command.c | 43 +---
src/qemu/qemu_driver.c | 170 +++++++--------
src/qemu/qemu_process.c | 141 ++++--------
src/test/test_driver.c | 5 +-
src/util/bitmap.c | 435 ++++++++++++++++++++++++++++++++++++--
src/util/bitmap.h | 36 +++-
src/util/processinfo.c | 36 ++--
src/util/processinfo.h | 9 +-
src/vmx/vmx.c | 36 ++--
tests/Makefile.am | 7 +-
tests/cpuset | 2 +-
tests/virbitmaptest.c | 362 +++++++++++++++++++++++++++++++
tools/virsh-domain.c | 2 +-
27 files changed, 1136 insertions(+), 706 deletions(-)
create mode 100644 tests/virbitmaptest.c
--
1.7.10.2