mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: migration: No longer avoid 'auto-read-only' option for migration
The 'auto-read-only' blockdev option is available in all supported qemu versions so we can remove the migration hack which disabled it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
829d9ed829
commit
682db64417
@ -1513,14 +1513,10 @@ qemuBlockStorageSourceAttachDataFree(qemuBlockStorageSourceAttachData *data)
|
||||
*/
|
||||
qemuBlockStorageSourceAttachData *
|
||||
qemuBlockStorageSourceAttachPrepareBlockdev(virStorageSource *src,
|
||||
virStorageSource *backingStore,
|
||||
bool autoreadonly)
|
||||
virStorageSource *backingStore)
|
||||
{
|
||||
g_autoptr(qemuBlockStorageSourceAttachData) data = NULL;
|
||||
unsigned int backendpropsflags = 0;
|
||||
|
||||
if (autoreadonly)
|
||||
backendpropsflags |= QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY;
|
||||
unsigned int backendpropsflags = QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY;
|
||||
|
||||
data = g_new0(qemuBlockStorageSourceAttachData, 1);
|
||||
|
||||
|
@ -134,8 +134,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockStorageSourceAttachData,
|
||||
|
||||
qemuBlockStorageSourceAttachData *
|
||||
qemuBlockStorageSourceAttachPrepareBlockdev(virStorageSource *src,
|
||||
virStorageSource *backingStore,
|
||||
bool autoreadonly);
|
||||
virStorageSource *backingStore);
|
||||
|
||||
qemuBlockStorageSourceAttachData *
|
||||
qemuBlockStorageSourceDetachPrepare(virStorageSource *src);
|
||||
|
@ -10937,7 +10937,7 @@ qemuBuildStorageSourceChainAttachPrepareBlockdevOne(qemuBlockStorageSourceChainD
|
||||
{
|
||||
g_autoptr(qemuBlockStorageSourceAttachData) elem = NULL;
|
||||
|
||||
if (!(elem = qemuBlockStorageSourceAttachPrepareBlockdev(src, backingStore, true)))
|
||||
if (!(elem = qemuBlockStorageSourceAttachPrepareBlockdev(src, backingStore)))
|
||||
return -1;
|
||||
|
||||
if (qemuBuildStorageSourceAttachPrepareCommon(src, elem) < 0)
|
||||
|
@ -1045,11 +1045,8 @@ qemuMigrationSrcNBDStorageCopyBlockdev(virDomainObj *vm,
|
||||
tlsAlias, tlsHostname)))
|
||||
return -1;
|
||||
|
||||
/* Migration via blockdev-mirror was supported sooner than the auto-read-only
|
||||
* feature was added to qemu */
|
||||
if (!(data = qemuBlockStorageSourceAttachPrepareBlockdev(copysrc,
|
||||
copysrc->backingStore,
|
||||
false)))
|
||||
copysrc->backingStore)))
|
||||
return -1;
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_MIGRATION_OUT) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user