A possible patch for a dangling pointer issue of librbd engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx
---
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) {
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux