19.12.2019 13:36, Peter Krempa wrote: > On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> >> It's a continuation for >> "bitmap migration bug with -drive while block mirror runs" >> <315cff78-dcdb-a3ce-2742-da3cc9f0c...@redhat.com> >> https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg07241.html >> >> The problem is that bitmaps migrated to node with same node-name or >> blk-parent name. And currently only the latter actually work in libvirt. >> And with mirror-top filter it doesn't work, because >> bdrv_get_device_or_node_name don't go through filters. > > I want to point out that since libvirt-5.10 we use -blockdev to > configure the backend of storage devices with qemu-4.2 and later. This > means unfortunately that the BlockBackend of the drive does not have a > name any more and thus the above will not work even if you make the > lookup code to see through filters.
Should we support qemu-4.2 and later for earlier versions of libvirt? > > As I've pointed out separately node-names are not good idea to use for > matching either as they can be distinct on the destination of migration. > > Having same node names for images during migration was not documented as > a requiremend and even if it was the case when the mirror job is used > the destination is a different image and thus having a different node > name is expected. > > Since it's not documented, expect the same situation as with > autogenerated nodenames, the destination may have different node-names > and the same node-name may refer to a different image. Implicit matching > based on node-names is thus impossible. > So, it's time to implement explicit matching.. I remember we discussed a command to set this matching on source. So we call qmp command on source, which specifies where bitmaps go on target.. Is it OK? Or, is it better to do it symmetrically, calling on source command, which just binds some migration-ids to the bitmaps. And same command on target, to bind these ids to bitmaps on target.. Hmmm. I think better, to still set matching not to ids but to {node_name, bitmap_name} pair, but allow do it either on source or on target (or both), which will allow to migrate from old qemu version without such command to new qemu version which supports it. -- Best regards, Vladimir