From d94722713ebd7bbdbf8b284b7563f2dd17964e24 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 25 Jul 2013 10:20:45 -0600 Subject: Add support for randomness of any IO direction sequential_random used to be applied to all of the IO directions, with no possibility of having different settings for reads, writes, and trims. Now it supports setting each of them individually. By default, if you do: sequential_random=50 it will still apply to all three. If you do: sequential_random=10,90,80 you would get reads 10% random, writes 90% random, and trims 80% random. Signed-off-by: Jens Axboe --- fio.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fio.h') diff --git a/fio.h b/fio.h index 8c67fccb..e7d5c27c 100644 --- a/fio.h +++ b/fio.h @@ -82,7 +82,9 @@ enum { FIO_RAND_FILE_SIZE_OFF, FIO_RAND_TRIM_OFF, FIO_RAND_BUF_OFF, - FIO_RAND_SEQ_RAND_OFF, + FIO_RAND_SEQ_RAND_READ_OFF, + FIO_RAND_SEQ_RAND_WRITE_OFF, + FIO_RAND_SEQ_RAND_TRIM_OFF, FIO_RAND_NR_OFFS, }; @@ -261,8 +263,8 @@ struct thread_data { * rand/seq mixed workload state */ union { - os_random_state_t seq_rand_state; - struct frand_state __seq_rand_state; + os_random_state_t seq_rand_state[DDIR_RWDIR_CNT]; + struct frand_state __seq_rand_state[DDIR_RWDIR_CNT]; }; /* -- cgit v1.2.3