From: Jens Axboe Date: Thu, 26 Apr 2018 19:23:10 +0000 (-0600) Subject: blktrace: ignore 0 byte writes X-Git-Tag: fio-3.7~17 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=897c606a258e1ac7a21fd30ff3a5de59a3d097a1;p=fio.git blktrace: ignore 0 byte writes They cause fio to exit replay, but then retry since we didn't meet our IO limit. When we retry, we attempt to close files that the trace already closed, and we crash. Signed-off-by: Jens Axboe --- diff --git a/blktrace.c b/blktrace.c index 1d5403a5..721bcd4b 100644 --- a/blktrace.c +++ b/blktrace.c @@ -310,7 +310,13 @@ static void handle_trace_fs(struct thread_data *td, struct blk_io_trace *t, rw = (t->action & BLK_TC_ACT(BLK_TC_WRITE)) != 0; - if (t->bytes > rw_bs[rw]) + /* + * Need to figure out why 0 byte writes end up here sometimes, for + * now just ignore them. + */ + if (!t->bytes) + return; + else if (t->bytes > rw_bs[rw]) rw_bs[rw] = t->bytes; ios[rw]++;