Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Dec 21, 2014

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 8a2b393b00dc4b6a8ba129a0e7850a78114ac75e:

gettime: hide fio_gtod_cpumask if not used (2014-12-19 15:04:10 -0700)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to b04f590551050b23768a3969d47371d363aa8745:

Fix default scrambling of buffers (2014-12-20 14:44:45 -0700)

----------------------------------------------------------------
Jens Axboe (1):
Fix default scrambling of buffers

 init.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

---

Diff of recent changes:

init.c +9 -5
index 427768c..d3dec0a 100644
@@ -933,12 +933,16 @@ static void init_flags(struct thread_data *td)
 	if (o->refill_buffers)
 		td->flags |= TD_F_REFILL_BUFFERS;
 	/*
-	 * Scramble by default, but not if zero_buffer is true and has been
-	 * set. But if scramble_buffers has been set, always scramble.
+	 * Always scramble buffers if asked to
 	 */
-	if (o->scramble_buffers && ((!o->zero_buffers &&
-	    fio_option_is_set(o, zero_buffers)) ||
-	    fio_option_is_set(o, scramble_buffers)))
+	if (o->scramble_buffers && fio_option_is_set(o, scramble_buffers))
+		td->flags |= TD_F_SCRAMBLE_BUFFERS;
+	/*
+	 * But also scramble buffers, unless we were explicitly asked
+	 * to zero them.
+	 */
+	if (o->scramble_buffers && !(o->zero_buffers &&
+	    fio_option_is_set(o, zero_buffers)))
 		td->flags |= TD_F_SCRAMBLE_BUFFERS;
 	if (o->verify != VERIFY_NONE)
 		td->flags |= TD_F_VER_NONE;