From patchwork Thu Aug 30 18:47:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 180860 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5A2C42C0201 for ; Fri, 31 Aug 2012 05:26:10 +1000 (EST) Received: from localhost ([::1]:42423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T79mf-0005Zg-7s for incoming@patchwork.ozlabs.org; Thu, 30 Aug 2012 14:48:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T79mB-0004Pf-4b for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T79mA-0005H4-2m for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T79m9-0005H0-Qi for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:33 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7UIlSxx014123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Aug 2012 14:47:28 -0400 Received: from localhost (ovpn-112-23.phx2.redhat.com [10.3.112.23]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q7UIlQ1P007932 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 30 Aug 2012 14:47:27 -0400 From: Jeff Cody To: qemu-devel@nongnu.org Date: Thu, 30 Aug 2012 14:47:10 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@gmail.com, eblake@redhat.com, supriyak@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH 4/7] block: raw image file reopen X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org These are the stubs for the file reopen drivers for the raw format. There is currently nothing that needs to be done by the raw driver in reopen. Signed-off-by: Jeff Cody --- block/raw.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/block/raw.c b/block/raw.c index ff34ea4..fa47ff1 100644 --- a/block/raw.c +++ b/block/raw.c @@ -9,6 +9,24 @@ static int raw_open(BlockDriverState *bs, int flags) return 0; } +/* We have nothing to do for raw reopen, stubs just return + * success */ +static int raw_reopen_prepare(BDRVReopenState *state, Error **errp) +{ + return 0; +} + +static void raw_reopen_commit(BDRVReopenState *state) +{ + return; +} + +static void raw_reopen_abort(BDRVReopenState *state) +{ + return; +} + + static int coroutine_fn raw_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { @@ -115,6 +133,10 @@ static BlockDriver bdrv_raw = { .bdrv_open = raw_open, .bdrv_close = raw_close, + .bdrv_reopen_prepare = raw_reopen_prepare, + .bdrv_reopen_commit = raw_reopen_commit, + .bdrv_reopen_abort = raw_reopen_abort, + .bdrv_co_readv = raw_co_readv, .bdrv_co_writev = raw_co_writev, .bdrv_co_is_allocated = raw_co_is_allocated,