From 660a1cb5fb9843ec09a04337714e78d63cd557e7 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 17 Apr 2007 15:37:47 +0200 Subject: [PATCH] Reduntant write bit checks No point in checking for td_rw(td) || td_write(), since td_write() will also be true for td_rw(). Signed-off-by: Jens Axboe --- filesetup.c | 2 +- fio.c | 2 +- io_u.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/filesetup.c b/filesetup.c index 6ccd357e..faeefaf3 100644 --- a/filesetup.c +++ b/filesetup.c @@ -222,7 +222,7 @@ int generic_open_file(struct thread_data *td, struct fio_file *f) if (td->o.sync_io) flags |= O_SYNC; - if (td_write(td) || td_rw(td)) { + if (td_write(td)) { flags |= O_RDWR; if (f->filetype == FIO_TYPE_FILE) diff --git a/fio.c b/fio.c index c7694456..c39868dd 100644 --- a/fio.c +++ b/fio.c @@ -641,7 +641,7 @@ static int init_io_u(struct thread_data *td) INIT_LIST_HEAD(&io_u->list); io_u->buf = p + max_bs * i; - if (td_write(td) || td_rw(td)) + if (td_write(td)) fill_rand_buf(io_u, max_bs); io_u->index = i; diff --git a/io_u.c b/io_u.c index 0487857e..d5dd84b9 100644 --- a/io_u.c +++ b/io_u.c @@ -654,7 +654,7 @@ static void io_completed(struct thread_data *td, struct io_u *io_u, add_bw_sample(td, idx, &icd->time); io_u_mark_latency(td, msec); - if ((td_rw(td) || td_write(td)) && idx == DDIR_WRITE && + if (td_write(td) && idx == DDIR_WRITE && td->o.verify != VERIFY_NONE) log_io_piece(td, io_u); -- 2.25.1