Patchwork [v4,10/19] block: raw image file reopen

login
register
mail settings
Submitter Jeff Cody
Date Sept. 20, 2012, 7:13 p.m.
Message ID <265cfa55c798a43d35bd5c09779a86d08f30e5a2.1348157913.git.jcody@redhat.com>
Download mbox | patch
Permalink /patch/185474/
State New
Headers show

Comments

Jeff Cody - Sept. 20, 2012, 7:13 p.m.
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>
---
 block/raw.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch

diff --git a/block/raw.c b/block/raw.c
index ff34ea4..253e949 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)
 {
@@ -115,6 +123,8 @@  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,
     .bdrv_co_is_allocated   = raw_co_is_allocated,