X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=blktrace.c;h=36a7180930d0f23bf036922820a7901f165a15c9;hp=cda111a3a391c0ce2325a22576938cfb2d9f5c41;hb=19a8064ef4a2a826ee06ed061af970d1737cf840;hpb=354d50e771451f510e5886275768abb63b602798 diff --git a/blktrace.c b/blktrace.c index cda111a3..36a71809 100644 --- a/blktrace.c +++ b/blktrace.c @@ -303,6 +303,11 @@ static void handle_trace_discard(struct thread_data *td, queue_io_piece(td, ipo); } +static void dump_trace(struct blk_io_trace *t) +{ + log_err("blktrace: ignoring zero byte trace: action=%x\n", t->action); +} + static void handle_trace_fs(struct thread_data *td, struct blk_io_trace *t, unsigned long long ttime, unsigned long *ios, unsigned int *rw_bs) @@ -323,7 +328,11 @@ static void handle_trace_fs(struct thread_data *td, struct blk_io_trace *t, return; } - assert(t->bytes); + if (!t->bytes) { + if (!fio_did_warn(FIO_WARN_BTRACE_ZERO)) + dump_trace(t); + return; + } if (t->bytes > rw_bs[rw]) rw_bs[rw] = t->bytes;