Replace random constant with the symbolic name (GR prime)
authorJens Axboe <jens.axboe@oracle.com>
Tue, 17 Apr 2007 17:52:18 +0000 (19:52 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 17 Apr 2007 17:52:18 +0000 (19:52 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index 4d225f84b409a7efde36394e05dd296157ad851b..d85f956f7c552a7e78b5fc18fdec1e6f9a17f372 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -35,6 +35,7 @@
 #include <sys/mman.h>
 
 #include "fio.h"
 #include <sys/mman.h>
 
 #include "fio.h"
+#include "hash.h"
 
 unsigned long page_mask;
 unsigned long page_size;
 
 unsigned long page_mask;
 unsigned long page_size;
@@ -595,11 +596,11 @@ static void cleanup_io_u(struct thread_data *td)
  */
 static void fill_io_buf(struct thread_data *td, struct io_u *io_u, int max_bs)
 {
  */
 static void fill_io_buf(struct thread_data *td, struct io_u *io_u, int max_bs)
 {
-       int *ptr = io_u->buf;
+       long *ptr = io_u->buf;
 
        if (!td->o.zero_buffers) {
                while ((void *) ptr - io_u->buf < max_bs) {
 
        if (!td->o.zero_buffers) {
                while ((void *) ptr - io_u->buf < max_bs) {
-                       *ptr = rand() * 0x9e370001;
+                       *ptr = rand() * GOLDEN_RATIO_PRIME;
                        ptr++;
                }
        } else
                        ptr++;
                }
        } else