aboutsummaryrefslogtreecommitdiff
path: root/block/qcow.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-04-24 14:54:40 +0200
committerKevin Wolf <kwolf@redhat.com>2020-04-30 17:51:07 +0200
commit7b8e4857426f2e2de2441749996c6161b550bada (patch)
tree1eefad11d9cba630ab52d21447b750f0382a7675 /block/qcow.c
parent92b92799dc8662b6f71809100a4aabc1ae408ebb (diff)
block: Add flags to bdrv(_co)_truncate()
Now that block drivers can support flags for .bdrv_co_truncate, expose the parameter in the node level interfaces bdrv_co_truncate() and bdrv_truncate(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200424125448.63318-3-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow.c')
-rw-r--r--block/qcow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qcow.c b/block/qcow.c
index 8973e4e565..6b5f2269f0 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -480,7 +480,7 @@ static int get_cluster_offset(BlockDriverState *bs,
return -E2BIG;
}
ret = bdrv_truncate(bs->file, cluster_offset + s->cluster_size,
- false, PREALLOC_MODE_OFF, NULL);
+ false, PREALLOC_MODE_OFF, 0, NULL);
if (ret < 0) {
return ret;
}
@@ -1035,7 +1035,7 @@ static int qcow_make_empty(BlockDriverState *bs)
l1_length) < 0)
return -1;
ret = bdrv_truncate(bs->file, s->l1_table_offset + l1_length, false,
- PREALLOC_MODE_OFF, NULL);
+ PREALLOC_MODE_OFF, 0, NULL);
if (ret < 0)
return ret;