'top' member added to qemuBlockJobPullData and the job's
"constructor" function
qemuBlockJobDiskNewPull() and its invocation changed to support the new member.
Signed-off-by: Pavel Mores <pmores(a)redhat.com>
---
src/qemu/qemu_blockjob.c | 2 ++
src/qemu/qemu_blockjob.h | 2 ++
src/qemu/qemu_driver.c | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 71df0d1ab2..e19a2ad76b 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -253,6 +253,7 @@ qemuBlockJobDataPtr
qemuBlockJobDiskNewPull(virDomainObjPtr vm,
virDomainDiskDefPtr disk,
virStorageSourcePtr base,
+ virStorageSourcePtr top,
unsigned int jobflags)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
@@ -270,6 +271,7 @@ qemuBlockJobDiskNewPull(virDomainObjPtr vm,
return NULL;
job->data.pull.base = base;
+ job->data.pull.top = top;
job->jobflags = jobflags;
if (qemuBlockJobRegister(job, vm, disk, true) < 0)
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index 72c7fa053e..7223b4abb8 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -77,6 +77,7 @@ typedef qemuBlockJobPullData *qemuBlockJobDataPullPtr;
struct _qemuBlockJobPullData {
virStorageSourcePtr base;
+ virStorageSourcePtr top;
};
@@ -177,6 +178,7 @@ qemuBlockJobDataPtr
qemuBlockJobDiskNewPull(virDomainObjPtr vm,
virDomainDiskDefPtr disk,
virStorageSourcePtr base,
+ virStorageSourcePtr top,
unsigned int jobflags);
qemuBlockJobDataPtr
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 81cca360e0..7970c913f3 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17398,7 +17398,7 @@ qemuDomainBlockPullCommon(virDomainObjPtr vm,
speed <<= 20;
}
- if (!(job = qemuBlockJobDiskNewPull(vm, disk, baseSource, /*topSource, */flags)))
+ if (!(job = qemuBlockJobDiskNewPull(vm, disk, baseSource, topSource, flags)))
goto endjob;
if (blockdev) {
--
2.24.1