X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=backend.c;h=d8f4f2a508119638b212d9dc1c3481ca50e7a989;hb=349d5f6c30cc7be60da8878d0b0078697f356897;hp=375a23e420a23b403b457bba084407f50be23641;hpb=995c45c08c7a362ae0fb2e54e2de27b555a757ab;p=fio.git diff --git a/backend.c b/backend.c index 375a23e4..d8f4f2a5 100644 --- a/backend.c +++ b/backend.c @@ -971,9 +971,11 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done) total_bytes += td->o.size; /* In trimwrite mode, each byte is trimmed and then written, so - * allow total_bytes to be twice as big */ - if (td_trimwrite(td)) + * allow total_bytes or number of ios to be twice as big */ + if (td_trimwrite(td)) { total_bytes += td->total_io_size; + td->o.number_ios *= 2; + } while ((td->o.read_iolog_file && !flist_empty(&td->io_log_list)) || (!flist_empty(&td->trim_list)) || !io_issue_bytes_exceeded(td) || @@ -1789,6 +1791,11 @@ static void *thread_main(void *data) if (td_io_init(td)) goto err; + if (td_ioengine_flagged(td, FIO_SYNCIO) && td->o.iodepth > 1) { + log_info("note: both iodepth >= 1 and synchronous I/O engine " + "are selected, queue depth will be capped at 1\n"); + } + if (init_io_u(td)) goto err; @@ -2451,10 +2458,8 @@ reap: strerror(ret)); } else { pid_t pid; - struct fio_file **files; void *eo; dprint(FD_PROCESS, "will fork\n"); - files = td->files; eo = td->eo; read_barrier(); pid = fork(); @@ -2465,9 +2470,6 @@ reap: _exit(ret); } else if (i == fio_debug_jobno) *fio_debug_jobp = pid; - // freeing previously allocated memory for files - // this memory freed MUST NOT be shared between processes, only the pointer itself may be shared within TD - free(files); free(eo); free(fd); fd = NULL;