log: fix for crash with rate IO and logging
authorJens Axboe <axboe@fb.com>
Fri, 2 Dec 2016 04:23:47 +0000 (21:23 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 2 Dec 2016 04:23:47 +0000 (21:23 -0700)
commit6be06c46544c19e513ff80e7b841b1de688ffc66
treee8a9eb9671292904bb627b8202c7b1554d94d6b7
parent6cd4463579e6d6c5db7c7af323525e1ab23b67e7
log: fix for crash with rate IO and logging

If we run with an IO rate, and it happens to be low enough that
we never need to wait for the queue full condition, we will never
regrow the log and hence crash in stat.c on this line:

assert(iolog->pending->nr_samples < iolog->pending->max_samples);

Fix this by shuffling the code around a bit, so io_u_quiesce()
regrows the log, if needed, after having reaped completions.

Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c
io_u.c