Flexible I/O Tester development
 help / color / mirror / Atom feed
* Scramble buffers not set by default unless set explicitly
@ 2014-12-20 16:32 Chris Wilson
  2014-12-20 21:45 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2014-12-20 16:32 UTC (permalink / raw)
  To: fio

A change (1bf2498d311155bc4eb43edb4e6d3a04845d94c5) to make scramble buffers easier to understand appears to have made scramble buffers not the default behavior by accident.  The logic would always evaluate such that scramble buffers is not used unless set explicitly.

I think the following little patch changes the logic to what was intended.

diff --git a/init.c b/init.c
index 427768c..a47186b 100644
--- a/init.c
+++ b/init.c
@@ -937,7 +937,7 @@ static void init_flags(struct thread_data *td)
         * set. But if scramble_buffers has been set, always scramble.
         */
        if (o->scramble_buffers && ((!o->zero_buffers &&
-           fio_option_is_set(o, zero_buffers)) ||
+           !fio_option_is_set(o, zero_buffers)) ||
            fio_option_is_set(o, scramble_buffers)))
                td->flags |= TD_F_SCRAMBLE_BUFFERS;
        if (o->verify != VERIFY_NONE)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Scramble buffers not set by default unless set explicitly
  2014-12-20 16:32 Scramble buffers not set by default unless set explicitly Chris Wilson
@ 2014-12-20 21:45 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2014-12-20 21:45 UTC (permalink / raw)
  To: Chris Wilson, fio

On 12/20/2014 09:32 AM, Chris Wilson wrote:
> A change (1bf2498d311155bc4eb43edb4e6d3a04845d94c5) to make scramble buffers easier to understand appears to have made scramble buffers not the default behavior by accident.  The logic would always evaluate such that scramble buffers is not used unless set explicitly.
> 
> I think the following little patch changes the logic to what was intended.

Oops, yes that was unintended. Your fix doesn't work for zero enabled
and scramble not set, however. I've checked in a two prong approach:

http://git.kernel.dk/?p=fio.git;a=commit;h=b04f590551050b23768a3969d47371d363aa8745

please let me know if that work as intended for you.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-20 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-20 16:32 Scramble buffers not set by default unless set explicitly Chris Wilson
2014-12-20 21:45 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox