X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=io_u.c;h=bcb893c5abad0ddc19c750dc7f802b7029252483;hb=d3851529fc160bdf8cfa266d2e4b4f87bb76cef9;hp=80df28548efba23f52652abab32926fc8dbcf65b;hpb=9dabe51c828e7d7951123e23f56dfdca4eda1dc4;p=fio.git diff --git a/io_u.c b/io_u.c index 80df2854..bcb893c5 100644 --- a/io_u.c +++ b/io_u.c @@ -644,7 +644,7 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir) uint64_t now; assert(ddir_rw(ddir)); - now = utime_since_now(&td->start); + now = utime_since_now(&td->epoch); /* * if rate_next_io_time is in the past, need to catch up to rate @@ -850,7 +850,7 @@ static void setup_strided_zone_mode(struct thread_data *td, struct io_u *io_u) /* * See if it's time to switch to a new zone */ - if (td->zone_bytes >= td->o.zone_size && td->o.zone_skip) { + if (td->zone_bytes >= td->o.zone_size) { td->zone_bytes = 0; f->file_offset += td->o.zone_range + td->o.zone_skip; @@ -901,6 +901,8 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u) if (td->o.zone_mode == ZONE_MODE_STRIDED) setup_strided_zone_mode(td, io_u); + else if (td->o.zone_mode == ZONE_MODE_ZBD) + setup_zbd_zone_mode(td, io_u); /* * No log, let the seq/rand engine retrieve the next buflen and @@ -1539,7 +1541,7 @@ again: assert(io_u->flags & IO_U_F_FREE); io_u_clear(td, io_u, IO_U_F_FREE | IO_U_F_NO_FILE_PUT | IO_U_F_TRIMMED | IO_U_F_BARRIER | - IO_U_F_VER_LIST); + IO_U_F_VER_LIST | IO_U_F_PRIORITY); io_u->error = 0; io_u->acct_ddir = -1; @@ -1828,7 +1830,7 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u, unsigned long long tnsec; tnsec = ntime_since(&io_u->start_time, &icd->time); - add_lat_sample(td, idx, tnsec, bytes, io_u->offset); + add_lat_sample(td, idx, tnsec, bytes, io_u->offset, io_u_is_prio(io_u)); if (td->flags & TD_F_PROFILE_OPS) { struct prof_io_ops *ops = &td->prof_io_ops; @@ -1847,7 +1849,7 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u, if (ddir_rw(idx)) { if (!td->o.disable_clat) { - add_clat_sample(td, idx, llnsec, bytes, io_u->offset); + add_clat_sample(td, idx, llnsec, bytes, io_u->offset, io_u_is_prio(io_u)); io_u_mark_latency(td, llnsec); } @@ -2089,7 +2091,7 @@ void io_u_queued(struct thread_data *td, struct io_u *io_u) td = td->parent; add_slat_sample(td, io_u->ddir, slat_time, io_u->xfer_buflen, - io_u->offset); + io_u->offset, io_u_is_prio(io_u)); } } @@ -2180,7 +2182,7 @@ void io_u_fill_buffer(struct thread_data *td, struct io_u *io_u, static int do_sync_file_range(const struct thread_data *td, struct fio_file *f) { - off64_t offset, nbytes; + uint64_t offset, nbytes; offset = f->first_write; nbytes = f->last_write - f->first_write;