From patchwork Mon Oct 25 15:24:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 69109 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CF53FB70A9 for ; Tue, 26 Oct 2010 02:36:20 +1100 (EST) Received: from localhost ([127.0.0.1]:51011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAP5t-0003nO-P5 for incoming@patchwork.ozlabs.org; Mon, 25 Oct 2010 11:36:17 -0400 Received: from [140.186.70.92] (port=58477 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAOtp-0006Ht-Tn for qemu-devel@nongnu.org; Mon, 25 Oct 2010 11:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAOtn-0002FB-Br for qemu-devel@nongnu.org; Mon, 25 Oct 2010 11:23:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAOtn-0002F0-2L for qemu-devel@nongnu.org; Mon, 25 Oct 2010 11:23:47 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9PFNkiX026210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 25 Oct 2010 11:23:46 -0400 Received: from dhcp-5-188.str.redhat.com (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9PFNidl029986; Mon, 25 Oct 2010 11:23:45 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Mon, 25 Oct 2010 17:24:29 +0200 Message-Id: <1288020269-17056-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH] vpc: Implement bdrv_flush X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Kevin Wolf --- block/vpc.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index e50509e..416f489 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -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, };