X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=io_u.c;h=161c2cb388d01218628da8468c1fdeba105e40ed;hb=c9e8d6e3c5b5f87e17a1f4ee740f88b5b3818831;hp=428b312c9b34fea3cd1db6d38b375fd1a14376e6;hpb=422f9e4b57549ce1e163b9c1de71932d9ea24de4;p=fio.git diff --git a/io_u.c b/io_u.c index 428b312c..161c2cb3 100644 --- a/io_u.c +++ b/io_u.c @@ -377,6 +377,12 @@ static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u) if (minbs == maxbs) return minbs; + /* + * If we can't satisfy the min block size from here, then fail + */ + if (!io_u_fits(td, io_u, minbs)) + return 0; + if (td->o.use_os_rand) rand_max = OS_RAND_MAX; else @@ -662,7 +668,7 @@ static int fill_io_u(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) { + if (td->zone_bytes >= td->o.zone_size && td->o.zone_skip) { td->zone_bytes = 0; io_u->file->file_offset += td->o.zone_range + td->o.zone_skip; io_u->file->last_pos = io_u->file->file_offset; @@ -1147,6 +1153,7 @@ static void small_content_scramble(struct io_u *io_u) p = io_u->xfer_buf; boffset = io_u->offset; + io_u->buf_filled_len = 0; for (i = 0; i < nr_blocks; i++) { /* @@ -1368,7 +1375,8 @@ static void io_completed(struct thread_data *td, struct io_u *io_u, } } - if (ramp_time_over(td) && td->runstate == TD_RUNNING) { + if (ramp_time_over(td) && (td->runstate == TD_RUNNING || + td->runstate == TD_VERIFYING)) { account_io_completion(td, io_u, icd, idx, bytes); if (__should_check_rate(td, idx)) {