aboutsummaryrefslogtreecommitdiff
path: root/block-vmdk.c
diff options
context:
space:
mode:
Diffstat (limited to 'block-vmdk.c')
-rw-r--r--block-vmdk.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/block-vmdk.c b/block-vmdk.c
index fc87be353b..4cc3db84a1 100644
--- a/block-vmdk.c
+++ b/block-vmdk.c
@@ -426,6 +426,12 @@ static void vmdk_close(BlockDriverState *bs)
close(s->fd);
}
+static void vmdk_flush(BlockDriverState *bs)
+{
+ BDRVVmdkState *s = bs->opaque;
+ fsync(s->fd);
+}
+
BlockDriver bdrv_vmdk = {
"vmdk",
sizeof(BDRVVmdkState),
@@ -435,5 +441,6 @@ BlockDriver bdrv_vmdk = {
vmdk_write,
vmdk_close,
vmdk_create,
+ vmdk_flush,
vmdk_is_allocated,
};