]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-bitmap.c
block/qcow2-bitmap: fix and improve qcow2_reopen_bitmaps_rw
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 27 Sep 2019 12:23:54 +0000 (15:23 +0300)
committerJohn Snow <jsnow@redhat.com>
Thu, 17 Oct 2019 21:53:28 +0000 (17:53 -0400)
commitf6333cbf8bc78c5fed3311c893597ad8d65be235
treefef5be8679784ea4e96ea98a00b9fef111750d4a
parent5d9388d4b23a5302acb53052add07514285b2976
block/qcow2-bitmap: fix and improve qcow2_reopen_bitmaps_rw

- Correct check for write access to file child, and in correct place
  (only if we want to write).
- Support reopen rw -> rw (which will be used in following commit),
  for example, !bdrv_dirty_bitmap_readonly() is not a corruption if
  bitmap is marked IN_USE in the image.
- Consider unexpected bitmap as a corruption and check other
  combinations of in-image and in-RAM bitmaps.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190927122355.7344-9-vsementsov@virtuozzo.com
Signed-off-by: John Snow <jsnow@redhat.com>
block/qcow2-bitmap.c