projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No need to use specific flag for io_u fill length
[fio.git]
/
io_u.c
diff --git
a/io_u.c
b/io_u.c
index 69edd70e5eafbb97ce3f5f915ee50450fcc90ac6..f27cddacf95f881792d392f7ca4097a1781e496d 100644
(file)
--- a/
io_u.c
+++ b/
io_u.c
@@
-983,6
+983,13
@@
struct io_u *get_io_u(struct thread_data *td)
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);
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);
+ else if (io_u->ddir == DDIR_READ) {
+ /*
+ * Reset the buf_filled parameters so next time if the
+ * buffer is used for writes it is refilled.
+ */
+ io_u->buf_filled_len = 0;
+ }
}
/*
}
/*
@@
-1079,7
+1086,13
@@
static void io_completed(struct thread_data *td, struct io_u *io_u,
if (!td->o.disable_clat || !td->o.disable_bw)
lusec = utime_since(&io_u->issue_time,
&icd->time);
if (!td->o.disable_clat || !td->o.disable_bw)
lusec = utime_since(&io_u->issue_time,
&icd->time);
+ if (!td->o.disable_lat) {
+ unsigned long tusec;
+ tusec = utime_since(&io_u->start_time,
+ &icd->time);
+ add_lat_sample(td, idx, tusec, bytes);
+ }
if (!td->o.disable_clat) {
add_clat_sample(td, idx, lusec, bytes);
io_u_mark_latency(td, lusec);
if (!td->o.disable_clat) {
add_clat_sample(td, idx, lusec, bytes);
io_u_mark_latency(td, lusec);