All of lore.kernel.org
 help / color / mirror / Atom feed
* A possible patch for a dangling pointer issue of librbd engine
@ 2014-05-19  1:58 xan.peng
  2014-05-19 15:37 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: xan.peng @ 2014-05-19  1:58 UTC (permalink / raw)
  To: fio@vger.kernel.org, daniel.gollub

I'm interested in the librbd engine, and I possibly found a bug which
you can see from the following patch.

And you can see more information at https://github.com/axboe/fio/pull/10.
(BTW, are github pull requests the correct way to submit patches to fio?)

Signed-off-by: Xan Peng xanpeng@gmail.com
---
diff --git a/engines/rbd.c b/engines/rbd.c
index ff35373..38528c2 100644
--- a/engines/rbd.c
+++ b/engines/rbd.c
@@ -131,8 +131,10 @@ static int _fio_rbd_connect(struct thread_data *td)

 failed_open:
        rados_ioctx_destroy(rbd_data->io_ctx);
+       rbd_data->io_ctx = NULL;
 failed_shutdown:
        rados_shutdown(rbd_data->cluster);
+       rbd_data->cluster = NULL;
 failed_early:
        return 1;
 }
@@ -354,9 +356,8 @@ static int fio_rbd_setup(struct thread_data *td)
         */
        td->o.use_thread = 1;

-       /* connect in the main thread to determine to determine
-        * the size of the given RADOS block device. And disconnect
-        * later on.
+       /* connect in the main thread to determine the size of the given RADOS
+        * block device. And disconnect later on.
         */
        r = _fio_rbd_connect(td);
        if (r) {

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

end of thread, other threads:[~2014-05-19 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19  1:58 A possible patch for a dangling pointer issue of librbd engine xan.peng
2014-05-19 15:37 ` Jens Axboe
2014-05-19 16:38   ` xan.peng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.