mirror of https://github.com/xemu-project/xemu.git
migration: Print block status when needed
The new line was only printed when command options were used. When we used migration parameters and capabilities, it wasn't. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231017172307.22858-2-quintela@redhat.com>
This commit is contained in:
parent
bef4e2ed8e
commit
17cd011d06
|
@ -30,6 +30,7 @@
|
||||||
#include "sysemu/runstate.h"
|
#include "sysemu/runstate.h"
|
||||||
#include "ui/qemu-spice.h"
|
#include "ui/qemu-spice.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
|
#include "options.h"
|
||||||
#include "migration.h"
|
#include "migration.h"
|
||||||
|
|
||||||
static void migration_global_dump(Monitor *mon)
|
static void migration_global_dump(Monitor *mon)
|
||||||
|
@ -696,7 +697,6 @@ void hmp_x_colo_lost_heartbeat(Monitor *mon, const QDict *qdict)
|
||||||
typedef struct HMPMigrationStatus {
|
typedef struct HMPMigrationStatus {
|
||||||
QEMUTimer *timer;
|
QEMUTimer *timer;
|
||||||
Monitor *mon;
|
Monitor *mon;
|
||||||
bool is_block_migration;
|
|
||||||
} HMPMigrationStatus;
|
} HMPMigrationStatus;
|
||||||
|
|
||||||
static void hmp_migrate_status_cb(void *opaque)
|
static void hmp_migrate_status_cb(void *opaque)
|
||||||
|
@ -722,7 +722,7 @@ static void hmp_migrate_status_cb(void *opaque)
|
||||||
|
|
||||||
timer_mod(status->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + 1000);
|
timer_mod(status->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + 1000);
|
||||||
} else {
|
} else {
|
||||||
if (status->is_block_migration) {
|
if (migrate_block()) {
|
||||||
monitor_printf(status->mon, "\n");
|
monitor_printf(status->mon, "\n");
|
||||||
}
|
}
|
||||||
if (info->error_desc) {
|
if (info->error_desc) {
|
||||||
|
@ -762,7 +762,6 @@ void hmp_migrate(Monitor *mon, const QDict *qdict)
|
||||||
|
|
||||||
status = g_malloc0(sizeof(*status));
|
status = g_malloc0(sizeof(*status));
|
||||||
status->mon = mon;
|
status->mon = mon;
|
||||||
status->is_block_migration = blk || inc;
|
|
||||||
status->timer = timer_new_ms(QEMU_CLOCK_REALTIME, hmp_migrate_status_cb,
|
status->timer = timer_new_ms(QEMU_CLOCK_REALTIME, hmp_migrate_status_cb,
|
||||||
status);
|
status);
|
||||||
timer_mod(status->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME));
|
timer_mod(status->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME));
|
||||||
|
|
Loading…
Reference in New Issue