summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Reitz2019-11-13 15:53:42 +0100
committerKevin Wolf2020-09-07 12:31:31 +0200
commitfb787f02a6dc1c6b459316376ccfe186ee85a2dc (patch)
tree1ebc61934d86cd67ff5465a6979669956f2e1597
parentblock: Flush all children in generic code (diff)
downloadqemu-fb787f02a6dc1c6b459316376ccfe186ee85a2dc.tar.gz
qemu-fb787f02a6dc1c6b459316376ccfe186ee85a2dc.tar.xz
qemu-fb787f02a6dc1c6b459316376ccfe186ee85a2dc.zip
vmdk: Drop vmdk_co_flush()
Before HEAD^, we needed this because bdrv_co_flush() by itself would only flush bs->file. With HEAD^, bdrv_co_flush() will flush all children on which a WRITE or WRITE_UNCHANGED permission has been taken. Thus, vmdk no longer needs to do it itself. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block/vmdk.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/block/vmdk.c b/block/vmdk.c
index d90855446a..8ec62c7ab7 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -2803,21 +2803,6 @@ static void vmdk_close(BlockDriverState *bs)
error_free(s->migration_blocker);
}
-static coroutine_fn int vmdk_co_flush(BlockDriverState *bs)
-{
- BDRVVmdkState *s = bs->opaque;
- int i, err;
- int ret = 0;
-
- for (i = 0; i < s->num_extents; i++) {
- err = bdrv_co_flush(s->extents[i].file->bs);
- if (err < 0) {
- ret = err;
- }
- }
- return ret;
-}
-
static int64_t vmdk_get_allocated_file_size(BlockDriverState *bs)
{
int i;
@@ -3081,7 +3066,6 @@ static BlockDriver bdrv_vmdk = {
.bdrv_close = vmdk_close,
.bdrv_co_create_opts = vmdk_co_create_opts,
.bdrv_co_create = vmdk_co_create,
- .bdrv_co_flush_to_disk = vmdk_co_flush,
.bdrv_co_block_status = vmdk_co_block_status,
.bdrv_get_allocated_file_size = vmdk_get_allocated_file_size,
.bdrv_has_zero_init = vmdk_has_zero_init,