Fix issue with dangling pointer in the rbd engine

Without this patch, after _fio_rbd_connect() failed, fio will hang for a few seconds, display the following logs and then quit:

====console output start====
rbd_iodepth32: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=rbd, iodepth=32
fio-2.1.9
Starting 1 process
rbd engine: RBD version: 0.1.8
rbd engine: RBD version: 0.1.8
rbd_open failed.
fio_rbd_connect failed.
common/Mutex.cc: In function 'void Mutex::Lock(bool)' thread 7f6e337aa780 time 2014-05-17 19:23:23.417285
common/Mutex.cc: 93: FAILED assert(r == 0)
ceph version 0.80 (b78644e)
1: (()+0x254093) [0x7f6e32502093]
2: (librados::RadosClient::shutdown()+0x1f) [0x7f6e324741df]
3: (rados_shutdown()+0x9) [0x7f6e32459209]
4: ./fio() [0x456a46]
5: (setup_files()+0xc2) [0x420872]
6: ./fio() [0x449c15]
7: (fio_backend()+0x115) [0x44a515]
8: (__libc_start_main()+0xf5) [0x7f6e311f3455]
9: ./fio() [0x40ad3c]
NOTE: a copy of the executable, or objdump -rdS is needed to interpret this.
terminate called after throwing an instance of 'ceph::FailedAssertion'
Aborted
====console output end====

With this patch, after _fio_rbd_connect() failed, fio will quit at once:

====console output start====
rbd_iodepth32: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=rbd, iodepth=32
fio-2.1.9
Starting 1 process
rbd engine: RBD version: 0.1.8
rbd_open failed.
fio_rbd_connect failed.

Run status group 0 (all jobs):
====console output end====

Signed-off-by: Xan Peng <xanpeng@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
1 file changed