On 03/15/2017 11:37 AM, Peter Krempa wrote:
Detect the node names when setting block threshold and when
reconnecting
or when they are cleared when a block job finishes. This operation will
become a no-op once we fully support node names.
---
src/qemu/qemu_block.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_block.h | 4 ++
src/qemu/qemu_blockjob.c | 2 +
src/qemu/qemu_driver.c | 5 +++
src/qemu/qemu_process.c | 4 ++
5 files changed, 113 insertions(+)
+
+static int
+qemuBlockDiskDetectNodes(virDomainDiskDefPtr disk,
+ const char *parentnode,
+ virHashTablePtr table)
+{
+ qemuBlockNodeNameBackingChainDataPtr entry = NULL;
+ virStorageSourcePtr src = disk->src;
+
+ /* don't attempt the detection if the top level already has node names */
+ if (!parentnode || src->nodeformat || src->nodebacking)
Should that be
if (!parentnode && (src->nodeformat || src->nodebacking))
to match the comment? As written, it looks like it short-circuits every
node that already has a node name, not just the parent node.
Otherwise looks good. Now for me to apply the patches and see if I can
trigger the event to happen...
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org