diff mbox

block/rbd: add .bdrv_reopen_prepare() stub

Message ID 3f8edd94-280c-8aa7-0f07-ab674ee4667b@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Färber May 13, 2016, 8:29 a.m. UTC
Add support for reopen() by adding the .bdrv_reopen_prepare() stub

Signed-off-by: Sebastian Färber <sfaerber82@gmail.com>
Tested-by: Sebastian Färber <sfaerber82@gmail.com>
---
 block/rbd.c | 9 +++++++++
 1 file changed, 9 insertions(+)

--
1.8.3.1
diff mbox

Patch

diff --git a/block/rbd.c b/block/rbd.c
index 5bc5b32..5f121b5 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -577,6 +577,14 @@  failed_opts:
     return r;
 }

+/* Note that this will not re-establish a connection with the Ceph cluster
+   - it is effectively a NOP.  */
+static int qemu_rbd_reopen_prepare(BDRVReopenState *state,
+                                   BlockReopenQueue *queue, Error **errp)
+{
+    return 0;
+}
+
 static void qemu_rbd_close(BlockDriverState *bs)
 {
     BDRVRBDState *s = bs->opaque;
@@ -976,6 +984,7 @@  static BlockDriver bdrv_rbd = {
     .instance_size      = sizeof(BDRVRBDState),
     .bdrv_needs_filename = true,
     .bdrv_file_open     = qemu_rbd_open,
+    .bdrv_reopen_prepare = qemu_rbd_reopen_prepare,
     .bdrv_close         = qemu_rbd_close,
     .bdrv_create        = qemu_rbd_create,
     .bdrv_has_zero_init = bdrv_has_zero_init_1,