summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3ee2a3c)
Signed-off-by: Pan Liu <pan.liu@istuary.com>
struct io_u **aio_events;
struct io_u **sort_events;
int fd; /* add for poll */
struct io_u **aio_events;
struct io_u **sort_events;
int fd; /* add for poll */
+ rbd->connected = false;
+
/* add for poll, init fd: -1 */
rbd->fd = -1;
/* add for poll, init fd: -1 */
rbd->fd = -1;
static int fio_rbd_init(struct thread_data *td)
{
int r;
static int fio_rbd_init(struct thread_data *td)
{
int r;
+ struct rbd_data *rbd = td->io_ops_data;
+ if (rbd->connected) {
+ return 0;
+ }
r = _fio_rbd_connect(td);
if (r) {
r = _fio_rbd_connect(td);
if (r) {
log_err("fio_rbd_connect failed.\n");
goto cleanup;
}
log_err("fio_rbd_connect failed.\n");
goto cleanup;
}
/* get size of the RADOS block device */
r = rbd_stat(rbd->image, &info, sizeof(info));
/* get size of the RADOS block device */
r = rbd_stat(rbd->image, &info, sizeof(info));
/* disconnect, then we were only connected to determine
* the size of the RBD.
*/
/* disconnect, then we were only connected to determine
* the size of the RBD.
*/
- _fio_rbd_disconnect(rbd);