From patchwork Thu Aug 30 18:47:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 180864 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 597682C024D for ; Fri, 31 Aug 2012 05:38:51 +1000 (EST) Received: from localhost ([::1]:43928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T79n3-0006NT-Qy for incoming@patchwork.ozlabs.org; Thu, 30 Aug 2012 14:48:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T79mJ-0004rz-O6 for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T79mI-0005Is-O2 for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T79mI-0005In-8t for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:42 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7UIlaIc022277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Aug 2012 14:47:36 -0400 Received: from localhost (ovpn-112-23.phx2.redhat.com [10.3.112.23]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7UIlYcq029057 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 30 Aug 2012 14:47:36 -0400 From: Jeff Cody To: qemu-devel@nongnu.org Date: Thu, 30 Aug 2012 14:47:13 -0400 Message-Id: <75fe63c11c414cfe7dc7edbd58d32f2c6dabba5d.1346352124.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 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 7/7] block: qcow 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 qcow format. There is currently nothing that needs to be done by the qcow driver in reopen. Signed-off-by: Jeff Cody --- block/qcow.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/block/qcow.c b/block/qcow.c index 7b5ab87..f201575 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -197,6 +197,26 @@ static int qcow_open(BlockDriverState *bs, int flags) return ret; } + +/* We have nothing to do for QCOW reopen, stubs just return + * success */ +static int qcow_reopen_prepare(BDRVReopenState *state, Error **errp) +{ + return 0; +} + +static void qcow_reopen_commit(BDRVReopenState *state) +{ + return; +} + +static void qcow_reopen_abort(BDRVReopenState *state) +{ + return; +} + + + static int qcow_set_key(BlockDriverState *bs, const char *key) { BDRVQcowState *s = bs->opaque; @@ -868,6 +888,9 @@ static BlockDriver bdrv_qcow = { .bdrv_probe = qcow_probe, .bdrv_open = qcow_open, .bdrv_close = qcow_close, + .bdrv_reopen_prepare = qcow_reopen_prepare, + .bdrv_reopen_commit = qcow_reopen_commit, + .bdrv_reopen_abort = qcow_reopen_abort, .bdrv_create = qcow_create, .bdrv_co_readv = qcow_co_readv,