diff options
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 790b5b188f..1a31f1d360 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1555,6 +1555,11 @@ static int qcow2_reopen_prepare(BDRVReopenState *state, /* We need to write out any unwritten data if we reopen read-only. */ if ((state->flags & BDRV_O_RDWR) == 0) { + ret = qcow2_reopen_bitmaps_ro(state->bs, errp); + if (ret < 0) { + goto fail; + } + ret = bdrv_flush(state->bs); if (ret < 0) { goto fail; |