iolog: tidy up log_io_piece() conditional
authorSitsofe Wheeler <sitsofe@yahoo.com>
Wed, 10 May 2017 05:33:31 +0000 (06:33 +0100)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Mon, 14 Aug 2017 03:43:45 +0000 (04:43 +0100)
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 <jeff.furlong@wdc.com>
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
iolog.c

diff --git a/iolog.c b/iolog.c
index b041eff43784e3963a074295fa22b2bb5b4e0734..760d7b0a43d97962bb7d065c6e464c7b89a7f5f5 100644 (file)
--- 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.
         *
         * 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)) &&
         */
        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;
                INIT_FLIST_HEAD(&ipo->list);
                flist_add_tail(&ipo->list, &td->io_hist_list);
                ipo->flags |= IP_F_ONLIST;