From 6e4567ba20d221c1a9f78bcfb58ceb280f4cf784 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 14 Feb 2012 11:13:42 +0100 Subject: [PATCH 17/99] vpc: Implement bdrv_flush RH-Author: Kevin Wolf Message-id: <1329218101-24213-18-git-send-email-kwolf@redhat.com> Patchwork-id: 37217 O-Subject: [RHEL-6.3 qemu-kvm PATCH v2 17/96] vpc: Implement bdrv_flush Bugzilla: 783950 RH-Acked-by: Paolo Bonzini RH-Acked-by: Marcelo Tosatti RH-Acked-by: Laszlo Ersek Bugzilla: 783950 Signed-off-by: Kevin Wolf (cherry picked from commit 4a4111851fa75bc91028a26eb75dcdd136d9032d) --- block/vpc.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) Signed-off-by: Michal Novotny --- block/vpc.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 265e36b..86a7271 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -417,6 +417,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 @@ -593,14 +597,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, }; -- 1.7.7.5