X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=io_u.c;h=47c02e0ad135dea4da458da5e0116084dd7885d7;hb=17127517a3ccff19993e36ec3f7bc15044898f2c;hp=8c2f33b5e85e1e16bb3d6aea7564cbd5181a5e62;hpb=c311cd2a9e3ca77f4d2cb2f6dd8bd08185e8c0f6;p=fio.git diff --git a/io_u.c b/io_u.c index 8c2f33b5..47c02e0a 100644 --- a/io_u.c +++ b/io_u.c @@ -686,6 +686,7 @@ static struct fio_file *get_next_file_rr(struct thread_data *td, int goodf, if (err) { dprint(FD_FILE, "error %d on open of %s\n", err, f->file_name); + f = NULL; continue; } opened = 1; @@ -847,7 +848,6 @@ struct io_u *get_io_u(struct thread_data *td) /* * Set io data pointers. */ - io_u->endpos = io_u->offset + io_u->buflen; io_u->xfer_buf = io_u->buf; io_u->xfer_buflen = io_u->buflen; @@ -917,11 +917,11 @@ static void io_completed(struct thread_data *td, struct io_u *io_u, &icd->time); if (!td->o.disable_clat) { - add_clat_sample(td, idx, usec); + add_clat_sample(td, idx, usec, bytes); io_u_mark_latency(td, usec); } if (!td->o.disable_bw) - add_bw_sample(td, idx, &icd->time); + add_bw_sample(td, idx, bytes, &icd->time); } if (td_write(td) && idx == DDIR_WRITE && @@ -1026,7 +1026,7 @@ void io_u_queued(struct thread_data *td, struct io_u *io_u) unsigned long slat_time; slat_time = utime_since(&io_u->start_time, &io_u->issue_time); - add_slat_sample(td, io_u->ddir, slat_time); + add_slat_sample(td, io_u->ddir, io_u->xfer_buflen, slat_time); } }