qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub
@ 2016-05-13  8:29 Sebastian Färber
  2016-05-13  8:45 ` Kevin Wolf
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Färber @ 2016-05-13  8:29 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, jdurgin, jcody, kwolf, mreitz

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(+)

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,
--
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-05-18 15:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13  8:29 [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub Sebastian Färber
2016-05-13  8:45 ` Kevin Wolf
2016-05-17 10:03   ` Sebastian Färber
2016-05-17 14:00     ` Jason Dillaman
2016-05-17 18:48     ` Josh Durgin
2016-05-18  7:36       ` Sebastian Färber
2016-05-18  8:19       ` Kevin Wolf
2016-05-18 15:54         ` Jason Dillaman
2016-05-18  5:31     ` Jeff Cody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).