All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] migration/block-dirty-bitmap: fix postcopy abort with bitmaps on several nodes
@ 2026-10-06 17:07 Denis V. Lunev
  2026-10-06 17:07 ` [PATCH v2 1/3] migration: add QEMU_COUNTED_STRING_SIZE for counted string buffers Denis V. Lunev
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Denis V. Lunev @ 2026-10-06 17:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Denis V. Lunev, Peter Xu, Fabiano Rosas, Eric Blake,
	Vladimir Sementsov-Ogievskiy

Postcopy migration of dirty bitmaps kills the destination as soon as
bitmaps live on more than one node:

  qemu-system-x86_64: ../block.c:6400: bdrv_lookup_bs: Assertion
  `qemu_in_main_thread()' failed.

The postcopy listen thread resolves node names with bdrv_lookup_bs()
without the BQL. With a single node the name is sent only during setup,
which runs in the main thread, so the existing test never gets there.

We hit it in production with libvirt: a CBT backup leaves a persistent
bitmap on every disk, libvirt enables the dirty-bitmaps capability, and
the next live migration of any VM with more than one disk aborts the
destination after the guest has already been switched over to it.

Patch 1 names the counted string buffer size that patch 2 needs. Patch 2
resolves every chunk but START from the bitmaps that START set up,
instead of from the block graph. Patch 3 extends
migrate-bitmaps-postcopy-test with a bitmap on a second node, and it
fails without patch 2.

Changes in v2:
- new patch 1: add QEMU_COUNTED_STRING_SIZE instead of bare 256 (Eric)
- patch 2: drop the "Error: " prefix from the new error message (Eric)
- patch 2: move node_alias to the end of LoadBitmapState
- patch 3: add Eric's Tested-by and Reviewed-by

v1: https://lore.kernel.org/qemu-devel/20260924115611.4098417-1-den@openvz.org/

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Fabiano Rosas <farosas@suse.de>
Cc: Eric Blake <eblake@redhat.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

Denis V. Lunev (3):
  migration: add QEMU_COUNTED_STRING_SIZE for counted string buffers
  migration/block-dirty-bitmap: fix postcopy abort with bitmaps on
    several nodes
  iotests/migrate-bitmaps-postcopy-test: add a bitmap on a second node

 include/migration/qemu-file-types.h           |  6 +-
 migration/block-dirty-bitmap.c                | 62 +++++++++++++++++--
 migration/qemu-file.c                         |  5 +-
 .../tests/migrate-bitmaps-postcopy-test       | 19 ++++++
 4 files changed, 83 insertions(+), 9 deletions(-)


base-commit: 942229961efea74b153c44c59188eb08375f10f1
-- 
2.53.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-07 21:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 17:07 [PATCH v2 0/3] migration/block-dirty-bitmap: fix postcopy abort with bitmaps on several nodes Denis V. Lunev
2026-10-06 17:07 ` [PATCH v2 1/3] migration: add QEMU_COUNTED_STRING_SIZE for counted string buffers Denis V. Lunev
2026-10-06 21:33   ` Eric Blake
2026-10-06 17:07 ` [PATCH v2 2/3] migration/block-dirty-bitmap: fix postcopy abort with bitmaps on several nodes Denis V. Lunev
2026-10-07 12:01   ` Eric Blake
2026-10-06 17:07 ` [PATCH v2 3/3] iotests/migrate-bitmaps-postcopy-test: add a bitmap on a second node Denis V. Lunev
2026-10-07 21:44   ` Eric Blake
2026-10-07 12:22 ` [PATCH v2 0/3] migration/block-dirty-bitmap: fix postcopy abort with bitmaps on several nodes Eric Blake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.