qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 07/12] VMDK: vmdk_flush for extents
@ 2011-06-04  0:42 Fam Zheng
  2011-06-18 16:46 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Fam Zheng @ 2011-06-04  0:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Christoph Hellwig

Vmdk flush in extent array style.


Signed-off-by: Fam Zheng <famcool@gmail.com>
---
 block/vmdk.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index f1233cf..1d74b62 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1094,7 +1094,14 @@ static void vmdk_close(BlockDriverState *bs)

 static int vmdk_flush(BlockDriverState *bs)
 {
-    return bdrv_flush(bs->file);
+    int i, ret;
+    BDRVVmdkState *s = bs->opaque;
+
+    ret = bdrv_flush(bs->file);
+    for (i = 0; i < s->num_extents; i++) {
+        ret |= bdrv_flush(s->extents[i].file);
+    }
+    return ret;
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-18 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-04  0:42 [Qemu-devel] [PATCH 07/12] VMDK: vmdk_flush for extents Fam Zheng
2011-06-18 16:46 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).