mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: Setup host side of VDPA device for block copy
Setup the VDPA bits of the appropriate part of the image chain for block copy. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
98dd641e86
commit
9ca910488c
@ -23,6 +23,7 @@
|
||||
#include "qemu_domain.h"
|
||||
#include "qemu_alias.h"
|
||||
#include "qemu_security.h"
|
||||
#include "qemu_process.h"
|
||||
|
||||
#include "storage_source.h"
|
||||
#include "viralloc.h"
|
||||
@ -3675,6 +3676,9 @@ qemuBlockPivot(virDomainObj *vm,
|
||||
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY) &&
|
||||
virStorageSourceHasBacking(disk->mirror)) {
|
||||
|
||||
if (qemuProcessPrepareHostStorageSourceChain(vm, disk->mirror->backingStore) < 0)
|
||||
return -1;
|
||||
|
||||
if (!(chainattachdata = qemuBuildStorageSourceChainAttachPrepareBlockdev(disk->mirror->backingStore)))
|
||||
return -1;
|
||||
|
||||
|
@ -14290,10 +14290,16 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY)) {
|
||||
g_autoptr(virStorageSource) terminator = virStorageSourceNew();
|
||||
|
||||
if (qemuProcessPrepareHostStorageSource(vm, mirror) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!(data = qemuBuildStorageSourceChainAttachPrepareBlockdevTop(mirror,
|
||||
terminator)))
|
||||
goto endjob;
|
||||
} else {
|
||||
if (qemuProcessPrepareHostStorageSourceChain(vm, mirror) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!(data = qemuBuildStorageSourceChainAttachPrepareBlockdev(mirror)))
|
||||
goto endjob;
|
||||
}
|
||||
@ -14308,6 +14314,9 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
|
||||
if (mirror_shallow) {
|
||||
/* if external backing store is populated we'll need to open it */
|
||||
if (virStorageSourceHasBacking(mirror)) {
|
||||
if (qemuProcessPrepareHostStorageSourceChain(vm, mirror->backingStore) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!(data = qemuBuildStorageSourceChainAttachPrepareBlockdev(mirror->backingStore)))
|
||||
goto endjob;
|
||||
|
||||
@ -14321,6 +14330,9 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
|
||||
mirrorBacking = mirror->backingStore;
|
||||
}
|
||||
|
||||
if (qemuProcessPrepareHostStorageSource(vm, mirror) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!(crdata = qemuBuildStorageSourceChainAttachPrepareBlockdevTop(mirror,
|
||||
mirrorBacking)))
|
||||
goto endjob;
|
||||
|
Loading…
Reference in New Issue
Block a user