qemu/migration
Denis V. Lunev 3f3f5cdb92 migration/block-dirty-bitmap: reject bitmap load onto ro node
dirty_bitmap_load_start() creates an incoming migrated bitmap with
bdrv_create_dirty_bitmap() and, if the source marked it persistent,
calls bdrv_dirty_bitmap_set_persistence() without checking whether
the destination node can be written to. Same gap as
qmp_block_dirty_bitmap_add(), reached via incoming migration: a
persistent bitmap for a read-only destination (e.g. a migrated
CD-ROM-class attachment with dirty-bitmaps migration enabled) ends
up writable in memory on a node that can never store it.

Reject it the same way, with one difference from the QMP path:
every destination node is BDRV_O_INACTIVE until migration completes,
so bdrv_is_writable() would reject every incoming persistent
bitmap, not just read-only ones. Check bdrv_is_read_only() alone.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Eric Blake <eblake@redhat.com>
CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
CC: John Snow <jsnow@redhat.com>
CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-ID: <20260716112242.3000035-3-den@openvz.org>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
2026-08-17 18:32:44 +03:00
..
block-active.c migration/block-active: Remove global active flag 2025-02-06 14:26:51 +01:00
block-dirty-bitmap.c migration/block-dirty-bitmap: reject bitmap load onto ro node 2026-08-17 18:32:44 +03:00
channel-block.c migration: add FEATURE_SEEKABLE to QIOChannelBlock 2025-11-03 16:04:09 -05:00
channel-block.h migration: introduce a QIOChannel impl for BlockDriverState VMState 2022-06-22 19:33:43 +01:00
channel.c migration: Fix rare hang of migration_channel_read_peek() 2026-08-13 09:41:40 -04:00
channel.h migration: Move URI parsing to channel.c 2026-01-23 11:32:18 -03:00
colo-failover.c migration/colo: Improve an x-colo-lost-heartbeat error message 2023-02-23 14:10:17 +01:00
colo-stubs.c migration/colo: make colo_incoming_co() return void 2024-05-22 17:34:31 -03:00
colo.c migration: Fail migration if switchover-ack is requested after switchover decision 2026-07-07 07:12:46 +02:00
cpr-exec.c migration: Rename MIG_EVENT_PRECOPY_* to MIG_EVENT_* 2026-02-17 09:43:09 -03:00
cpr-transfer.c migration: Fix crash on second migration when cancel early 2026-05-19 16:23:13 -04:00
cpr.c migration/cpr: use hashtable for cpr fds 2026-05-20 15:49:10 -04:00
cpu-throttle.c migration: Drop use of Stat64 2026-01-17 10:46:31 +11:00
dirtyrate.c cocci: Do not initialize variable used by RAMBLOCK_FOREACH* macro 2026-05-06 16:10:46 +02:00
dirtyrate.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
exec.c migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
exec.h migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
fd.c migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
fd.h migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
file.c migration/file: switch file_write_ramblock_iov to pwritev_all 2026-04-23 12:14:51 -03:00
file.h migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
global_state.c migration/global_state: replace strcpy("") with explicit NUL termination 2026-05-20 15:41:33 -04:00
meson.build migration: use stub_ss for vfio-stub.c 2026-05-28 18:44:00 +02:00
migration-hmp-cmds.c migration/hmp-cmds: Include 'block/block-global-state.h' header 2026-08-16 16:32:42 +02:00
migration-stats.c migration: Drop use of Stat64 2026-01-17 10:46:31 +11:00
migration-stats.h migration: Remember total dirty bytes in mig_stats 2026-05-05 12:35:25 -04:00
migration.c spelling: happend 2026-07-23 17:57:09 +03:00
migration.h migration: Fix "switchover" used as a verb in comments and docs 2026-07-07 07:12:46 +02:00
multifd-colo.c multifd: Add COLO support 2026-03-09 08:53:32 -03:00
multifd-colo.h multifd: Add COLO support 2026-03-09 08:53:32 -03:00
multifd-device-state.c migration: Replace migrate_set_error() with migrate_error_propagate() 2025-12-23 09:24:34 -05:00
multifd-nocomp.c multifd: Add COLO support 2026-03-09 08:53:32 -03:00
multifd-qatzip.c migration/multifd: Replace assert() with error_setg() in recv paths 2026-08-12 08:39:39 -04:00
multifd-qpl.c migration/multifd: Replace assert() with error_setg() in recv paths 2026-08-12 08:39:39 -04:00
multifd-uadk.c migration/multifd: Replace assert() with error_setg() in recv paths 2026-08-12 08:39:39 -04:00
multifd-zero-page.c migration: Drop use of Stat64 2026-01-17 10:46:31 +11:00
multifd-zlib.c migration/multifd: Validate next_packet_size in zlib/zstd recv 2026-08-12 08:39:39 -04:00
multifd-zstd.c migration/multifd: Validate next_packet_size in zlib/zstd recv 2026-08-12 08:39:39 -04:00
multifd.c migration/multifd: cache channel count in multifd_send_sync_main 2026-05-20 15:41:33 -04:00
multifd.h multifd: Add COLO support 2026-03-09 08:53:32 -03:00
options.c migration: Enable new switchover-ack 2026-07-07 07:12:46 +02:00
options.h migration/rdma: add x-rdma-chunk-size parameter 2026-05-05 12:35:24 -04:00
page_cache.c migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE 2025-12-23 09:24:34 -05:00
page_cache.h migration: Clean up signed vs. unsigned XBZRLE cache-size 2021-02-08 11:19:51 +00:00
postcopy-ram.c migration: clean up postcopy blocktime presentation 2026-07-17 12:33:42 -04:00
postcopy-ram.h migration: Introduce postcopy incoming setup and cleanup functions 2025-11-03 16:04:10 -05:00
qemu-file.c migration: fix qemu_get_counted_string annotation 2026-07-27 15:51:03 +04:00
qemu-file.h migration/qemu-file: drop incorrect const from qemu_get_buffer_at buf 2026-04-23 12:14:52 -03:00
ram.c migration/ram: Check for RAMBlock size mismatch when parsing 2026-08-13 09:41:40 -04:00
ram.h include: reorganize memory API headers 2025-12-27 10:11:09 +01:00
rdma.c migration/rdma: annotate and simplify wait_comp_channel() 2026-07-27 15:51:03 +04:00
rdma.h migration/channel: Centralize calling migration_channel_connect_outgoing 2026-01-23 11:34:25 -03:00
savevm.c migration: Fix "switchover" used as a verb in comments and docs 2026-07-07 07:12:46 +02:00
savevm.h migration: Refactor migration_completion_precopy() to return bool 2026-07-07 07:12:46 +02:00
socket.c migration: Rename instances of start 2026-01-23 11:32:18 -03:00
socket.h migration: Rename instances of start 2026-01-23 11:32:18 -03:00
tls.c migration/channel: Rename migration_channel_connect 2026-01-23 11:32:18 -03:00
tls.h migration: Handle error in the early async paths 2026-01-23 11:32:17 -03:00
trace-events Migration pull for rc1 2026-07-20 11:12:38 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vfio-stub.c migration/vfio: compile only once 2025-09-02 17:57:05 +02:00
vfio.c migration/vfio: compile only once 2025-09-02 17:57:05 +02:00
vmstate-types.c migration/vmstate: Add VMState support for GByteArray 2026-06-01 19:32:49 +00:00
vmstate.c migration/vmstate: avoid per-element heap churn in vmsd ptr marker field 2026-05-20 15:41:33 -04:00
xbzrle.c migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
xbzrle.h migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
yank_functions.c migration/yank: Use channel features 2024-01-29 11:02:12 +08:00
yank_functions.h migration: Move the yank unregister of channel_close out 2021-07-26 12:45:03 +01:00