Signed-off-by: Peter Krempa <pkre...@redhat.com> --- src/qemu/qemu_backup.c | 2 +- src/qemu/qemu_checkpoint.c | 2 +- src/qemu/qemu_domain.c | 10 +++------- src/qemu/qemu_domain.h | 3 +-- src/qemu/qemu_driver.c | 6 +++--- src/qemu/qemu_snapshot.c | 13 +++++-------- 6 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index b90185a375..60cb79d70d 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -260,7 +260,7 @@ qemuBackupDiskPrepareDataOne(virDomainObj *vm, return -1; } - if (!qemuDomainDiskBlockJobIsSupported(vm, dd->domdisk)) + if (!qemuDomainDiskBlockJobIsSupported(dd->domdisk)) return -1; if (dd->store->format == VIR_STORAGE_FILE_NONE) { diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index 933ea41023..98e1a94def 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu/qemu_checkpoint.c @@ -372,7 +372,7 @@ qemuCheckpointPrepare(virQEMUDriver *driver, return -1; } - if (!qemuDomainDiskBlockJobIsSupported(vm, vm->def->disks[i])) + if (!qemuDomainDiskBlockJobIsSupported(vm->def->disks[i])) return -1; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index fb29135179..8999f58d20 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11349,19 +11349,15 @@ qemuDomainInitializePflashStorageSource(virDomainObj *vm, /** * qemuDomainDiskBlockJobIsSupported: * - * Returns true if block jobs are supported on @disk by @vm or false and reports + * Returns true if block jobs are supported on @disk orfalse and reports * an error otherwise. * * Note that this does not verify whether other block jobs are running etc. */ bool -qemuDomainDiskBlockJobIsSupported(virDomainObj *vm, - virDomainDiskDef *disk) +qemuDomainDiskBlockJobIsSupported(virDomainDiskDef *disk) { - qemuDomainObjPrivate *priv = vm->privateData; - - if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV) && - qemuDiskBusIsSD(disk->bus)) { + if (qemuDiskBusIsSD(disk->bus)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("block jobs are not supported on disk '%s' using bus 'sd'"), disk->dst); diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 66188ed003..b674d49207 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -1054,8 +1054,7 @@ qemuDomainInitializePflashStorageSource(virDomainObj *vm, virQEMUDriverConfig *cfg); bool -qemuDomainDiskBlockJobIsSupported(virDomainObj *vm, - virDomainDiskDef *disk); +qemuDomainDiskBlockJobIsSupported(virDomainDiskDef *disk); int qemuDomainDefNumaCPUsRectify(virDomainDef *def, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1ecc9a71b3..4c3e12966a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14482,7 +14482,7 @@ qemuDomainBlockPullCommon(virDomainObj *vm, if (qemuDomainDiskBlockJobIsActive(disk)) goto endjob; - if (!qemuDomainDiskBlockJobIsSupported(vm, disk)) + if (!qemuDomainDiskBlockJobIsSupported(disk)) goto endjob; if (base && @@ -15015,7 +15015,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, if (qemuDomainDiskBlockJobIsActive(disk)) goto endjob; - if (!qemuDomainDiskBlockJobIsSupported(vm, disk)) + if (!qemuDomainDiskBlockJobIsSupported(disk)) goto endjob; if (disk->device == VIR_DOMAIN_DISK_DEVICE_LUN && @@ -15484,7 +15484,7 @@ qemuDomainBlockCommit(virDomainPtr dom, if (!(disk = qemuDomainDiskByName(vm->def, path))) goto endjob; - if (!qemuDomainDiskBlockJobIsSupported(vm, disk)) + if (!qemuDomainDiskBlockJobIsSupported(disk)) goto endjob; if (virStorageSourceIsEmpty(disk->src)) { diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index b96ef7a50b..f52f705cb1 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -447,8 +447,7 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapshotDiskDef *snapdisk, static int -qemuSnapshotPrepareDiskExternalActive(virDomainObj *vm, - virDomainSnapshotDiskDef *snapdisk, +qemuSnapshotPrepareDiskExternalActive(virDomainSnapshotDiskDef *snapdisk, virDomainDiskDef *domdisk) { virStorageType actualType = virStorageSourceGetActualType(snapdisk->src); @@ -463,7 +462,7 @@ qemuSnapshotPrepareDiskExternalActive(virDomainObj *vm, return -1; } - if (!qemuDomainDiskBlockJobIsSupported(vm, domdisk)) + if (!qemuDomainDiskBlockJobIsSupported(domdisk)) return -1; switch (actualType) { @@ -492,8 +491,7 @@ qemuSnapshotPrepareDiskExternalActive(virDomainObj *vm, static int -qemuSnapshotPrepareDiskExternal(virDomainObj *vm, - virDomainDiskDef *disk, +qemuSnapshotPrepareDiskExternal(virDomainDiskDef *disk, virDomainSnapshotDiskDef *snapdisk, bool active, bool reuse) @@ -508,7 +506,7 @@ qemuSnapshotPrepareDiskExternal(virDomainObj *vm, if (qemuSnapshotPrepareDiskExternalInactive(snapdisk, disk) < 0) return -1; } else { - if (qemuSnapshotPrepareDiskExternalActive(vm, snapdisk, disk) < 0) + if (qemuSnapshotPrepareDiskExternalActive(snapdisk, disk) < 0) return -1; } @@ -701,8 +699,7 @@ qemuSnapshotPrepare(virDomainObj *vm, } } - if (qemuSnapshotPrepareDiskExternal(vm, dom_disk, disk, - active, reuse) < 0) + if (qemuSnapshotPrepareDiskExternal(dom_disk, disk, active, reuse) < 0) return -1; external++; -- 2.36.1