From 7a6cba611d09f8eccdfc90d5ad3eb03762e60ce9 Mon Sep 17 00:00:00 2001 From: pbrook Date: Sun, 4 Jun 2006 11:39:07 +0000 Subject: Disk cache flush support. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1949 c046a42c-6fe2-441c-8c8c-71466251a162 --- block-vmdk.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'block-vmdk.c') 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, }; -- cgit v1.2.3