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:
Peter Krempa 2023-10-17 16:10:47 +02:00
parent 829d9ed829
commit 682db64417
4 changed files with 5 additions and 13 deletions

View File

@ -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);

View File

@ -134,8 +134,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockStorageSourceAttachData,
qemuBlockStorageSourceAttachData *
qemuBlockStorageSourceAttachPrepareBlockdev(virStorageSource *src,
virStorageSource *backingStore,
bool autoreadonly);
virStorageSource *backingStore);
qemuBlockStorageSourceAttachData *
qemuBlockStorageSourceDetachPrepare(virStorageSource *src);

View File

@ -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)

View File

@ -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)