qemu-e2k/migration
Vladimir Sementsov-Ogievskiy 107cfb7254 migration: fix bitmaps pre-blockdev migration with mirror job
Important thing for bitmap migration is to select destination block
node to obtain the migrated bitmap.

Prepatch, on source we use bdrv_get_device_or_node_name() to identify
the node, and on target we do bdrv_lookup_bs.
bdrv_get_device_or_node_name() returns blk name only for direct
children of blk. So, bitmaps of direct children of blks are migrated by
blk name and others - by node name.

Old libvirt is unprepared to bitmap migration by node-name,
node-names are mostly auto-generated. So actually only migration by blk
name works for it.

Newer libvirt will use new interface (which will be added soon) to
specify node-mapping for bitmaps migration explicitly. Still, let's
improve the current behavior a bit.

Now, consider classic libvirt migrations assisted by mirror block job:
mirror block job inserts filter, so our source is not a direct child of
blk, and bitmaps are migrated by node-names. And this just doesn't work
with auto-generated node names.

Let's fix it by using blk-name even if some implicit filters are
inserted.

Note2: we, of course, can't skip filters and use blk name to migrate
bitmaps in filtered node by blk name for this blk if these filters have
named bitmaps which should be migrated.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1652424
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200521220648.3255-4-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: comment typo fix, shorter subject line]
Signed-off-by: Eric Blake <eblake@redhat.com>
2020-05-28 13:15:22 -05:00
..
block-dirty-bitmap.c migration: fix bitmaps pre-blockdev migration with mirror job 2020-05-28 13:15:22 -05:00
block.c
block.h
channel.c
channel.h
colo-failover.c
colo.c migration/colo: Add missing error-propagation code 2020-05-07 17:40:24 +01:00
exec.c
exec.h
fd.c
fd.h
global_state.c
Makefile.objs
migration.c migration/xbzrle: add encoding rate 2020-05-07 17:40:24 +01:00
migration.h
multifd-zlib.c
multifd-zstd.c
multifd.c migration/multifd: Do error_free after migrate_set_error to avoid memleaks 2020-05-07 17:40:24 +01:00
multifd.h
page_cache.c
page_cache.h
postcopy-ram.c
postcopy-ram.h
qemu-file-channel.c
qemu-file-channel.h
qemu-file.c
qemu-file.h
qjson.c
qjson.h
ram.c migration/xbzrle: add encoding rate 2020-05-07 17:40:24 +01:00
ram.h COLO: Optimize memory back-up process 2020-03-13 09:36:30 +00:00
rdma.c migration/rdma: fix a memleak on error path in rdma_start_incoming_migration 2020-05-07 17:40:24 +01:00
rdma.h
savevm.c
savevm.h
socket.c
socket.h
tls.c
tls.h
trace-events
vmstate-types.c
vmstate.c
xbzrle.c
xbzrle.h