Re: [PATCH 23/23] qemu: block: Add code to detect node names when necessary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 15, 2017 at 17:37:35 +0100, 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(+)

I forgot to commit this diff prior to sending this series:

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index ebf11ceb6..e31907842 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -338,6 +338,7 @@ int
 qemuBlockNodeNamesDetect(virQEMUDriverPtr driver,
                          virDomainObjPtr vm)
 {
+    qemuDomainObjPrivatePtr priv = vm->privateData;
     virHashTablePtr disktable = NULL;
     virHashTablePtr nodenametable = NULL;
     virJSONValuePtr data = NULL;
@@ -346,6 +347,9 @@ qemuBlockNodeNamesDetect(virQEMUDriverPtr driver,
     size_t i;
     int ret = -1;

+    if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QUERY_NAMED_BLOCK_NODES))
+        return 0;
+
     qemuDomainObjEnterMonitor(driver, vm);

     disktable = qemuMonitorGetBlockInfo(qemuDomainGetMonitor(vm));

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux