#include "fio.h"
#include "hash.h"
#include "verify.h"
+#include "lib/rand.h"
struct io_completion_data {
int nr; /* input */
long *ptr = io_u->buf;
if (!td->o.zero_buffers) {
+ unsigned long r = __rand(&__fio_rand_state);
+
+ if (sizeof(int) != sizeof(*ptr))
+ r *= (unsigned long) __rand(&__fio_rand_state);
+
while ((void *) ptr - io_u->buf < max_bs) {
- *ptr = rand() * GOLDEN_RATIO_PRIME;
+ *ptr = r;
ptr++;
+ r *= GOLDEN_RATIO_PRIME;
+ r >>= 3;
}
} else
memset(ptr, 0, max_bs);