From 4a06cb413586b95ebc271b0985e907ddcdb3dc4d Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Wed, 10 May 2017 06:33:31 +0100 Subject: [PATCH] iolog: tidy up log_io_piece() conditional Code inspection shows there are currently guards in the call sites of log_io_piece() that prevent log_io_piece() being called when td->o.verify == VERIFY_NONE so skip checking it within log_io_piece(). Tested-by: Jeff Furlong Signed-off-by: Sitsofe Wheeler --- iolog.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/iolog.c b/iolog.c index b041eff4..760d7b0a 100644 --- a/iolog.c +++ b/iolog.c @@ -231,13 +231,12 @@ void log_io_piece(struct thread_data *td, struct io_u *io_u) * writes. In this case, just reading back data in the order we wrote * it out is the faster but still safe. * - * One exception is if we don't have a random map AND we are doing - * verifies, in that case we need to check for duplicate blocks and - * drop the old one, which we rely on the rb insert/lookup for - * handling. + * One exception is if we don't have a random map in which case we need + * to check for duplicate blocks and drop the old one, which we rely on + * the rb insert/lookup for handling. */ if (((!td->o.verifysort) || !td_random(td)) && - (file_randommap(td, ipo->file) || td->o.verify == VERIFY_NONE)) { + file_randommap(td, ipo->file)) { INIT_FLIST_HEAD(&ipo->list); flist_add_tail(&ipo->list, &td->io_hist_list); ipo->flags |= IP_F_ONLIST; -- 2.25.1