[libvirt] [PATCH 9/9] qemu: monitor: Add APIs for 'blockdev-create'

Ján Tomko jtomko at redhat.com
Wed Jun 26 08:39:09 UTC 2019


On Mon, Jun 24, 2019 at 05:54:56PM +0200, Peter Krempa wrote:
>The 'blockdev-create' starts a job which creates a storage volume using
>the given protocol or formats an existing (added) volume with one of the
>supported storage formats.
>
>This patch adds the monitor interaction bits.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_monitor.c      | 30 ++++++++++++++++++++++++++++++
> src/qemu/qemu_monitor.h      |  4 ++++
> src/qemu/qemu_monitor_json.c | 26 ++++++++++++++++++++++++++
> src/qemu/qemu_monitor_json.h |  5 +++++
> 4 files changed, 65 insertions(+)
>
>diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
>index 9358d0b1e2..90cd5ea9bd 100644
>--- a/src/qemu/qemu_monitor.c
>+++ b/src/qemu/qemu_monitor.c
>@@ -4418,6 +4418,36 @@ qemuMonitorSetWatchdogAction(qemuMonitorPtr mon,
> }
>
>
>+/**
>+ * qemuMonitorBlockdevCreate:
>+ * @mon: monitor object
>+ * @jobname: name of the job
>+ * @props: JSON object describing the blockdev to add
>+ *
>+ * Instructs qemu to create/format a new stroage or format layer. Note that
>+ * the job does not add the created/formatted image into qemu and
>+ * qemuMonitorBlockdevAdd needs to be called separately with corresponding
>+ * arguments. Note that the argumetns for creating and adding are different.

*arguments

>+ *
>+ * Note that @props is always consumed by this function and should not be
>+ * accessed after calling this function.
>+ */

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190626/be2d128a/attachment-0001.sig>


More information about the libvir-list mailing list