aboutsummaryrefslogtreecommitdiff
path: root/qapi/string-output-visitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-01 11:08:25 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-04-02 13:49:36 +0200
commitdaff7f0bbe9950d045bb5b74f202295f70ab3aaa (patch)
tree22e248f745776150ae9fa1462abaf911762040ad /qapi/string-output-visitor.c
parent811f8652712a4ec2ff73c2c5dca35581a25112a4 (diff)
downloadqemu-daff7f0bbe9950d045bb5b74f202295f70ab3aaa.zip
qemu-daff7f0bbe9950d045bb5b74f202295f70ab3aaa.tar.gz
qemu-daff7f0bbe9950d045bb5b74f202295f70ab3aaa.tar.bz2
migration: Support adding migration blockers earlier
migrate_add_blocker() asserts we have a current_migration object, in migrate_get_current(). We do only after migration_object_init(). This contributes to the following dependency cycle: * configure_blockdev() must run before machine_set_property() so machine properties can refer to block backends * machine_set_property() before configure_accelerator() so machine properties like kvm-irqchip get applied * configure_accelerator() before migration_object_init() so that Xen's accelerator compat properties get applied. * migration_object_init() before configure_blockdev() so configure_blockdev() can add migration blockers The cycle was closed when recent commit cda4aa9a5a0 "Create block backends before setting machine properties" added the first dependency, and satisfied it by violating the last one. Broke block backends that add migration blockers, as demonstrated by qemu-iotests 055. To fix it, break the last dependency: make migrate_add_blocker() usable before migration_object_init(). The previous commit already removed the use of migrate_get_current() from migrate_add_blocker() itself. Didn't quite do the trick, as there's another one hiding in migration_is_idle(). The use there isn't actually necessary: when no migration object has been created yet, migration is surely idle. Make migration_is_idle() return true then. Fixes: cda4aa9a5a08777cf13e164c0543bd4888b8adce Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190401090827.20793-4-armbru@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Diffstat (limited to 'qapi/string-output-visitor.c')
0 files changed, 0 insertions, 0 deletions