On 05/17/2016 10:25 AM, Peter Krempa wrote:
Recently I NACKed quite a few patches attempting to add checks to the
post
parse callback infrastructure that would inhbit configs from being loaded
after daemon restart.
To solve this introduce a new infrastructure that will get called only on
codepaths that define and start the config leaving the code paths that load
configs untouched.
Peter Krempa (6):
conf: disk: Rename virDomainDiskDefValidate to
virDomainDiskDefParseValidate
qemu: driver: Fix function header alignment of some functions
conf: Introduce infrastructure to add config validation to define time
qemu: Move check that validates 'min_guarantee' to
qemuDomainDefValidate
conf: Move check that validates disk info to virDomainDefValidate
conf: Add validation infrastructure for device hot/cold plug
src/conf/domain_conf.c | 128 +++++++++++++++++++++++++++++++++++++++--------
src/conf/domain_conf.h | 11 ++--
src/libvirt_private.syms | 3 +-
src/qemu/qemu_conf.h | 2 +
src/qemu/qemu_domain.c | 38 ++++++++++++++
src/qemu/qemu_domain.h | 3 ++
src/qemu/qemu_driver.c | 26 ++++++++--
src/qemu/qemu_process.c | 19 ++++---
8 files changed, 190 insertions(+), 40 deletions(-)
Well I see that patch 6 addresses the comments from patch 3 at least
from qemuAttach
The genesis of what is now virDomainDiskDefValidate was to attempt to
extract out one of the qemuCheckDiskConfig checks into an earlier
failure. Looking at that - I would think it would be a prime candidate
to become patch 7 (yeah, I know, patches welcome...). Thinking about
that code though reminds me - virStorageTranslateDiskSourcePool would
need to be called...
I'm in favor of this, but figure a few more eyes on it can also help.
John