Fix race condition when using asynch verify
I discovered the race condition when using asynch verify with libaio engine.
The code assumes that because the td->cur_depth value is not 0 that
there is still I/O pending and issues io_getevents when the I/O was
actually being verified by the asynchronous verify thread. This causes
the code to hang.
(Updated by Jens to use a new io_u->flag bitfield instead of adding a new
integer to struct io_u).
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/ioengine.h b/ioengine.h
index 3df0944..eb6655d 100644
--- a/ioengine.h
+++ b/ioengine.h
@@ -4,9 +4,10 @@
#define FIO_IOOPS_VERSION 10
enum {
- IO_U_F_FREE = 1 << 0,
- IO_U_F_FLIGHT = 1 << 1,
- IO_U_F_FREE_DEF = 1 << 2,
+ IO_U_F_FREE = 1 << 0,
+ IO_U_F_FLIGHT = 1 << 1,
+ IO_U_F_FREE_DEF = 1 << 2,
+ IO_U_F_IN_CUR_DEPTH = 1 << 3,
};
/*