From 29216ed14f0bae35d1d9bb114a1aee7ee6837670 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 17 Sep 2010 16:57:48 +0200 Subject: qcow2: Move sync out of qcow2_alloc_clusters Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/qcow2-refcount.c') diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 4fc3f80..7082601 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -629,8 +629,6 @@ int64_t qcow2_alloc_clusters(BlockDriverState *bs, int64_t size) return ret; } - bdrv_flush(bs->file); - return offset; } @@ -678,6 +676,8 @@ int64_t qcow2_alloc_bytes(BlockDriverState *bs, int size) goto redo; } } + + bdrv_flush(bs->file); return offset; } -- cgit v1.1