diff options
author | Kevin Wolf <kwolf@redhat.com> | 2010-09-17 16:57:48 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-09-21 15:39:42 +0200 |
commit | 29216ed14f0bae35d1d9bb114a1aee7ee6837670 (patch) | |
tree | 0efa159973f58e73a1ee93c200783b1a94d7d465 /block/qcow2-snapshot.c | |
parent | 1c4c28149fff77b8c983fdabe4e76bdc8cadd572 (diff) |
qcow2: Move sync out of qcow2_alloc_clusters
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2-snapshot.c')
-rw-r--r-- | block/qcow2-snapshot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index 6228612f84..bbfcaaae22 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -138,6 +138,7 @@ static int qcow_write_snapshots(BlockDriverState *bs) snapshots_size = offset; snapshots_offset = qcow2_alloc_clusters(bs, snapshots_size); + bdrv_flush(bs->file); offset = snapshots_offset; if (offset < 0) { return offset; @@ -271,6 +272,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info) if (l1_table_offset < 0) { goto fail; } + bdrv_flush(bs->file); sn->l1_table_offset = l1_table_offset; sn->l1_size = s->l1_size; |