On 16.07.26 14:22, Denis V. Lunev wrote:
block-dirty-bitmap-remove refuses any readonly bitmap outright, via
the generic BDRV_BITMAP_RO check in bdrv_dirty_bitmap_check(). That
check cannot tell whether the bitmap is actually on disk, so it also
blocks dropping one that only ever existed in memory, which needs no
write at all.
Drop the blanket check and let qcow2 decide: bdrv_remove_persistent_
dirty_bitmap() already treats an absent on-disk entry as a no-op, so
such a bitmap is now released with no write attempted. For one that
is genuinely stored, qcow2_co_remove_persistent_dirty_bitmap_locked()
now checks can_write() before it would update the on-disk directory,
so removal still fails there, with a message naming the actual
reason instead of just the bitmap's readonly flag.
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