aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2-bitmap.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-01-23 12:40:45 +0100
committerKevin Wolf <kwolf@redhat.com>2018-01-23 12:40:46 +0100
commit8c0c5e636e6b11eaf0556be31fceb68e0baff310 (patch)
tree0996a8b85fadf92146125207e5b890e63d41af60 /block/qcow2-bitmap.c
parent7c3a3028596db5e142c6fc9644800a0ec3b073fd (diff)
parent94254c9b1166288c943ab3c2eed81d6cb4e6d187 (diff)
Merge remote-tracking branch 'mreitz/tags/pull-block-2018-01-23' into queue-block
Block patches # gpg: Signature made Tue Jan 23 12:35:11 2018 CET # gpg: using RSA key F407DB0061D5CF40 # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * mreitz/tags/pull-block-2018-01-23: (25 commits) iotests: Disable some tests for compat=0.10 iotests: Split 177 into two parts for compat=0.10 iotests: Make 059 pass on machines with little RAM iotests: Filter compat-dependent info in 198 iotests: Make 191 work with qcow2 options iotests: Make 184 image-less iotests: Make 089 compatible with compat=0.10 iotests: Fix 067 for compat=0.10 iotests: Fix 059's reference output iotests: Fix 051 for compat=0.10 iotests: Fix 020 for vmdk iotests: Skip 103 for refcount_bits=1 iotests: Forbid 020 for non-file protocols iotests: Drop format-specific in _filter_img_info iotests: Fix _img_info for backslashes block/vmdk: Add blkdebug events block/qcow: Add blkdebug events qcow2: No persistent dirty bitmaps for compat=0.10 block/vmdk: Fix , instead of ; at end of line qemu-iotests: Fix locking issue in 102 ... Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2-bitmap.c')
-rw-r--r--block/qcow2-bitmap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c
index f45e46cfbd..efa10c6663 100644
--- a/block/qcow2-bitmap.c
+++ b/block/qcow2-bitmap.c
@@ -1449,6 +1449,16 @@ bool qcow2_can_store_new_dirty_bitmap(BlockDriverState *bs,
bool found;
Qcow2BitmapList *bm_list;
+ if (s->qcow_version < 3) {
+ /* Without autoclear_features, we would always have to assume
+ * that a program without persistent dirty bitmap support has
+ * accessed this qcow2 file when opening it, and would thus
+ * have to drop all dirty bitmaps (defeating their purpose).
+ */
+ error_setg(errp, "Cannot store dirty bitmaps in qcow2 v2 files");
+ goto fail;
+ }
+
if (check_constraints_on_bitmap(bs, name, granularity, errp) != 0) {
goto fail;
}