aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/qcow2.c')
-rw-r--r--block/qcow2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 0fc9b0561e..0dd77c6367 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -3670,9 +3670,7 @@ static int coroutine_fn qcow2_co_truncate(BlockDriverState *bs, int64_t offset,
}
/* cannot proceed if image has bitmaps */
- if (s->nb_bitmaps) {
- /* TODO: resize bitmaps in the image */
- error_setg(errp, "Can't resize an image which has bitmaps");
+ if (qcow2_truncate_bitmaps_check(bs, errp)) {
ret = -ENOTSUP;
goto fail;
}