From: Jens Axboe Date: Thu, 27 Oct 2005 07:29:37 +0000 (+0200) Subject: [PATCH] fio: update default random seed X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=eb39963fd9d088d40eba0be04a3efafb4e9c51b3;p=disktools.git [PATCH] fio: update default random seed --- diff --git a/fio.c b/fio.c index 8e33014..0bc22e8 100644 --- a/fio.c +++ b/fio.c @@ -126,6 +126,7 @@ enum { #define DEF_CREATE (1) #define DEF_INVALIDATE (1) #define DEF_SYNCIO (0) +#define DEF_RANDSEED (0xb1899bedUL) #define ALIGN(buf) (char *) (((unsigned long) (buf) + MASK) & ~(MASK)) @@ -294,7 +295,7 @@ static void sig_handler(int sig) static int init_random_state(struct thread_data *td) { - unsigned long seed = 123; + unsigned long seed; if (td->sequential) return 0; @@ -314,7 +315,8 @@ static int init_random_state(struct thread_data *td) } close(fd); - } + } else + seed = DEF_RANDSEED; srand48_r(seed, &td->random_state); return 0;