[libvirt RFC 07/24] qemu_block: introduce qemuBlockFinalize

Pavel Hrdina posted 24 patches 3 years, 5 months ago
[libvirt RFC 07/24] qemu_block: introduce qemuBlockFinalize
Posted by Pavel Hrdina 3 years, 5 months ago
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 src/qemu/qemu_block.c | 16 ++++++++++++++++
 src/qemu/qemu_block.h |  4 ++++
 2 files changed, 20 insertions(+)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index ce26afe611..92b0fc9812 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -3541,3 +3541,19 @@ qemuBlockPivot(virDomainObj *vm,
 
     return ret;
 }
+
+int
+qemuBlockFinalize(virDomainObj *vm,
+                  qemuBlockJobData *job)
+{
+    int ret;
+    qemuDomainObjPrivate *priv = vm->privateData;
+
+    qemuDomainObjEnterMonitor(vm);
+
+    ret = qemuMonitorJobFinalize(priv->mon, job->name);
+
+    qemuDomainObjExitMonitor(vm);
+
+    return ret;
+}
diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
index 85dd9c086c..82389d3a58 100644
--- a/src/qemu/qemu_block.h
+++ b/src/qemu/qemu_block.h
@@ -302,3 +302,7 @@ int
 qemuBlockPivot(virDomainObj *vm,
                qemuBlockJobData *job,
                virDomainDiskDef *disk);
+
+int
+qemuBlockFinalize(virDomainObj *vm,
+                  qemuBlockJobData *job);
-- 
2.37.2
Re: [libvirt RFC 07/24] qemu_block: introduce qemuBlockFinalize
Posted by Peter Krempa 3 years, 5 months ago
On Tue, Aug 23, 2022 at 18:32:10 +0200, Pavel Hrdina wrote:

...

> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---
>  src/qemu/qemu_block.c | 16 ++++++++++++++++
>  src/qemu/qemu_block.h |  4 ++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
> index ce26afe611..92b0fc9812 100644
> --- a/src/qemu/qemu_block.c
> +++ b/src/qemu/qemu_block.c
> @@ -3541,3 +3541,19 @@ qemuBlockPivot(virDomainObj *vm,
>  
>      return ret;
>  }
> +
> +int

The rest of this file is consistently using 2 lines between functions.