OSDN Git Service

vpc: Implement bdrv_flush
authorKevin Wolf <kwolf@redhat.com>
Fri, 22 Oct 2010 14:17:57 +0000 (16:17 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 4 Nov 2010 11:52:16 +0000 (12:52 +0100)
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vpc.c

index e50509e..416f489 100644 (file)
@@ -439,6 +439,10 @@ static int vpc_write(BlockDriverState *bs, int64_t sector_num,
     return 0;
 }
 
+static int vpc_flush(BlockDriverState *bs)
+{
+    return bdrv_flush(bs->file);
+}
 
 /*
  * Calculates the number of cylinders, heads and sectors per cylinder
@@ -618,14 +622,15 @@ static QEMUOptionParameter vpc_create_options[] = {
 };
 
 static BlockDriver bdrv_vpc = {
-    .format_name       = "vpc",
-    .instance_size     = sizeof(BDRVVPCState),
-    .bdrv_probe                = vpc_probe,
-    .bdrv_open         = vpc_open,
-    .bdrv_read         = vpc_read,
-    .bdrv_write                = vpc_write,
-    .bdrv_close                = vpc_close,
-    .bdrv_create       = vpc_create,
+    .format_name    = "vpc",
+    .instance_size  = sizeof(BDRVVPCState),
+    .bdrv_probe     = vpc_probe,
+    .bdrv_open      = vpc_open,
+    .bdrv_read      = vpc_read,
+    .bdrv_write     = vpc_write,
+    .bdrv_flush     = vpc_flush,
+    .bdrv_close     = vpc_close,
+    .bdrv_create    = vpc_create,
 
     .create_options = vpc_create_options,
 };