Fix race condition when using asynch verify
authorRadha Ramachandran <radha@google.com>
Tue, 3 Nov 2009 20:45:31 +0000 (21:45 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 3 Nov 2009 20:45:31 +0000 (21:45 +0100)
commit0c41214ff4e6f31f8df64aac37be7853aada6f1f
tree62bd1af21efdd51c5d40b57f27532b3a606c7c85
parent0e92f873a3d542d2b237d68fd9391c92a85fa0b8
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>
io_u.c
ioengine.h
verify.c