summaryrefslogtreecommitdiff
path: root/block/qcow2.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2017-11-23 03:08:17 +0100
committerMax Reitz <mreitz@redhat.com>2018-01-23 12:34:42 +0100
commitc9ceb3ec8a7e6dc4f74183ca7493895445b57845 (patch)
treee8cc603dfe0c99b3a8077847d7639c1870b19320 /block/qcow2.c
parent3c363575dc5fe325a8b16b1a18e1fa48120df6b6 (diff)
downloadqemu-c9ceb3ec8a7e6dc4f74183ca7493895445b57845.tar.gz
qcow2: No persistent dirty bitmaps for compat=0.10
Persistent dirty bitmaps require a properly functioning autoclear_features field, or we cannot track when an unsupporting program might overwrite them. Therefore, we cannot support them for compat=0.10 images. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-3-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r--block/qcow2.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 4348b2c0c5..1f80961e1b 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -302,9 +302,17 @@ static int qcow2_read_extensions(BlockDriverState *bs, uint64_t start_offset,
}
if (!(s->autoclear_features & QCOW2_AUTOCLEAR_BITMAPS)) {
- warn_report("a program lacking bitmap support "
- "modified this file, so all bitmaps are now "
- "considered inconsistent");
+ if (s->qcow_version < 3) {
+ /* Let's be a bit more specific */
+ warn_report("This qcow2 v2 image contains bitmaps, but "
+ "they may have been modified by a program "
+ "without persistent bitmap support; so now "
+ "they must all be considered inconsistent");
+ } else {
+ warn_report("a program lacking bitmap support "
+ "modified this file, so all bitmaps are now "
+ "considered inconsistent");
+ }
error_printf("Some clusters may be leaked, "
"run 'qemu-img check -r' on the image "
"file to fix.");