Return EILSEQ on verify errors instead of EIO
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index c0beafd46ad86e8640f815792b34af0078ef4856..fc49bd325879f01d63c53efaaff25cc0e34e63e2 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -838,7 +838,7 @@ struct io_u *get_io_u(struct thread_data *td)
 
                f->last_pos = io_u->offset + io_u->buflen;
 
-               if (td->o.verify != VERIFY_NONE)
+               if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_WRITE)
                        populate_verify_io_u(td, io_u);
                else if (td->o.refill_buffers && io_u->ddir == DDIR_WRITE)
                        io_u_fill_buffer(td, io_u, io_u->xfer_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);
        }
 }