qcow2: move qcow2_store_persistent_dirty_bitmaps() before cache flushing
authorPavel Butsykin <pbutsykin@virtuozzo.com>
Mon, 4 Sep 2017 10:18:00 +0000 (13:18 +0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 6 Sep 2017 12:40:18 +0000 (14:40 +0200)
commit83a8c775a8bf134eb18a719322939b74a818d750
tree35429d8c51aefb3b686e29bd16b11eb3ab9790e3
parent1e13e2015bfd23fc2a31dcc23ebe208a4d7fc701
qcow2: move qcow2_store_persistent_dirty_bitmaps() before cache flushing

After calling qcow2_inactivate(), all qcow2 caches must be flushed, but this
may not happen, because the last call qcow2_store_persistent_dirty_bitmaps()
can lead to marking l2/refcont cache as dirty.

Let's move qcow2_store_persistent_dirty_bitmaps() before the caсhe flushing
to fix it.

Cc: qemu-stable@nongnu.org
Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2.c