From ea5409f9347303aeb8478544662184ac4af49d20 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 2 Apr 2014 20:07:28 -0600 Subject: [PATCH] iolog: invert log_mask bits Get rid of the all-log-mask. Signed-off-by: Jens Axboe --- iolog.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/iolog.c b/iolog.c index 1af31cb3..deec0861 100644 --- a/iolog.c +++ b/iolog.c @@ -628,7 +628,6 @@ enum { CLAT_LOG_MASK = 8, IOPS_LOG_MASK = 16, - ALL_LOG_MASK = 31, ALL_LOG_NR = 5, }; @@ -662,7 +661,7 @@ static struct log_type log_types[] = { void fio_writeout_logs(struct thread_data *td) { - unsigned int log_mask = ALL_LOG_MASK; + unsigned int log_mask = 0; unsigned int log_left = ALL_LOG_NR; int old_state, i; @@ -677,11 +676,11 @@ void fio_writeout_logs(struct thread_data *td) struct log_type *lt = &log_types[i]; int ret; - if (log_mask & lt->mask) { + if (!(log_mask & lt->mask)) { ret = lt->fn(td, log_left != 1); if (!ret) { log_left--; - log_mask &= ~lt->mask; + log_mask |= lt->mask; } } } -- 2.25.1