From 8d680c6cf6d40c4a9c548aa860bc037bc767686e Mon Sep 17 00:00:00 2001
Message-Id: <8d680c6cf6d40c4a9c548aa860bc037bc767686e.1350493760.git.minovotn@redhat.com>
In-Reply-To: <c93188b6c6973932d2adaa52e6a4920db13b4e62.1350493760.git.minovotn@redhat.com>
References: <c93188b6c6973932d2adaa52e6a4920db13b4e62.1350493760.git.minovotn@redhat.com>
From: Jeffrey Cody <jcody@redhat.com>
Date: Wed, 17 Oct 2012 05:59:35 +0200
Subject: [PATCH 22/35] block: qcow image file reopen

RH-Author: Jeffrey Cody <jcody@redhat.com>
Message-id: <8d2157056f43c20d735335a61f8f2cb5fe641ff7.1350447475.git.jcody@redhat.com>
Patchwork-id: 43281
O-Subject: [RHEL6.4 qemu-kvm PATCH v4 22/35] block: qcow image file reopen
Bugzilla: 767233
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Eric Blake <eblake@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>

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 <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit d177692ede3129dcb18a6b0f5472577bed2e2688)
---
 block/qcow.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 block/qcow.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/block/qcow.c b/block/qcow.c
index c40c036..9b6b548 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -171,6 +171,15 @@ static int qcow_open(BlockDriverState *bs, int flags)
     return -1;
 }
 
+
+/* We have nothing to do for QCOW reopen, stubs just return
+ * success */
+static int qcow_reopen_prepare(BDRVReopenState *state,
+                               BlockReopenQueue *queue, Error **errp)
+{
+    return 0;
+}
+
 static int qcow_set_key(BlockDriverState *bs, const char *key)
 {
     BDRVQcowState *s = bs->opaque;
@@ -935,6 +944,7 @@ static BlockDriver bdrv_qcow = {
     .bdrv_probe		= qcow_probe,
     .bdrv_open		= qcow_open,
     .bdrv_close		= qcow_close,
+    .bdrv_reopen_prepare = qcow_reopen_prepare,
     .bdrv_create	= qcow_create,
     .bdrv_co_is_allocated = qcow_co_is_allocated,
     .bdrv_set_key	= qcow_set_key,
-- 
1.7.11.7

