From d4eaff654b6b2496880bbdfb75219944b9273516 Mon Sep 17 00:00:00 2001
Message-Id: <d4eaff654b6b2496880bbdfb75219944b9273516.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:32 +0200
Subject: [PATCH 19/35] block: raw image file reopen

RH-Author: Jeffrey Cody <jcody@redhat.com>
Message-id: <743bd982a87fc7b5a82c1d0840e073d00cf2cd5a.1350447475.git.jcody@redhat.com>
Patchwork-id: 43277
O-Subject: [RHEL6.4 qemu-kvm PATCH v4 19/35] block: raw 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 raw format.

There is currently nothing that needs to be done by the raw driver
in reopen.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 01bdddb5aaf4f660355cf764874f19271978f74f)

Conflicts:
	block/raw.c
---
 block/raw.c | 9 +++++++++
 1 file changed, 9 insertions(+)

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

diff --git a/block/raw.c b/block/raw.c
index db0d99a..2c7fb97 100644
--- a/block/raw.c
+++ b/block/raw.c
@@ -9,6 +9,14 @@ 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,
+                              BlockReopenQueue *queue,  Error **errp)
+{
+    return 0;
+}
+
 static int coroutine_fn raw_co_readv(BlockDriverState *bs, int64_t sector_num,
                                      int nb_sectors, QEMUIOVector *qiov)
 {
@@ -110,6 +118,7 @@ static BlockDriver bdrv_raw = {
 
     .bdrv_open          = raw_open,
     .bdrv_close         = raw_close,
+    .bdrv_reopen_prepare  = raw_reopen_prepare,
 
     .bdrv_co_readv      = raw_co_readv,
     .bdrv_co_writev     = raw_co_writev,
-- 
1.7.11.7

