This patch series adds a new watchdog action `dump' which lets libvirtd
can do auto-dump when receiving a watchdog event from qemu guest.
In order to make the function work, there must be a watchdog device
added to guest, and guest must have a watchdog daemon running, for
example, /etc/init.d/watchdog start or auto-started on boot.
Changes:
v6:
- remove struct qemud_worker and qemud_server.job, qemud_server.nworkers,
qemud_server.nactiveworkers, qemud_server.workers.
v5:
- qemu_driver is passed into threadpool as opaque parameter rather than
visit the global qemu_driver in worker function
- same situation as above of server in libvirtd.c
- also list auto_dump_path in src/qemu/libvirtd_qemu.aug and
src/qemu/test_libvirtd_qemu.aug
- check return value of qemuDomainObjEndJob for safety
v4:
- updated threadpool to follow libvirt naming style, use appropriate
internals APIs, and hide the struct definitions from the header
(by Daniel)
- fix an error that qemuDomainObjBeginJobWithDriver() get lost in
qemuDomainCoreDump()
- use thread pool in libvirtd (qemud worker)
v3:
- let default auto-dump dir be /var/lib/libvirt/qemu/dump
Hu Tao (4):
threadpool impl
Add a new function doCoreDump
Add a watchdog action `dump'
Using threadpool API to manage qemud worker
cfg.mk | 1 +
daemon/libvirtd.c | 187 +++++---------------------------
daemon/libvirtd.h | 16 +---
src/Makefile.am | 1 +
src/conf/domain_conf.c | 1 +
src/conf/domain_conf.h | 1 +
src/libvirt_private.syms | 6 +
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 5 +
src/qemu/qemu_conf.c | 16 +++-
src/qemu/qemu_conf.h | 5 +
src/qemu/qemu_driver.c | 228 ++++++++++++++++++++++++++++----------
src/qemu/test_libvirtd_qemu.aug | 2 +
src/util/threadpool.c | 231 +++++++++++++++++++++++++++++++++++++++
src/util/threadpool.h | 48 ++++++++
15 files changed, 517 insertions(+), 232 deletions(-)
create mode 100644 src/util/threadpool.c
create mode 100644 src/util/threadpool.h
--
1.7.3
--
Thanks,
Hu Tao