On 16.07.26 14:22, Denis V. Lunev wrote:
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<[email protected]>
CC: Eric Blake<[email protected]>
CC: Vladimir Sementsov-Ogievskiy<[email protected]>
CC: John Snow<[email protected]>
CC: Andrey Drobyshev<[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
--
Best regards,
Vladimir