verify: fix a bug with verify_async
There's a race between marking an io_u as deferred, completing it,
and checking of that flag. It cannot be done reliably for async
verify threads. So change the mechanism to have the verify_async
part pull the io_u completely, so we don't have to check for a flag
in it after we have run ->end_io().
This fixes a bug with verify_async, where fio would crash with
this message:
fio: io_u.c:1315: __get_io_u: Assertion `io_u->flags & IO_U_F_FREE' failed
This race has always existed, but was made considerably worse with
this commit:
commit 2ae0b204743d6b4048c6fffd46c6280a70f2ecd1
Author: Jens Axboe <axboe@kernel.dk>
Date: Tue May 28 14:16:55 2013 +0200
Replace list based free/busy/requeue list with FIFO + ring
Cache friendliness of the list is pretty low. This has
provably lower overhead.
since we moved from a single list holding the io, to a separate
verify list and io_u queues. The above bug is happening because
the io_u ends up on both the freelist and the pending verify list,
causing mayhem.
Reported-by: scameron@beardog.cce.hp.com
Signed-off-by: Jens Axboe <axboe@fb.com>
5 files changed