Switch to using our internal Tausworthe based random generator for offsets

It's both faster and more exhaustive than what is available on
glibc on my test systems. So no downsides, and the upside of having
the same offset generator across all platforms.

This will change the random series, so could alter performance for
your workload since the pattern will be different in sequence. There's
an option to revert to the OS generator, you can add use_us_rand=1
on your job files to retain the old generator offsets.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/io_u.c b/io_u.c
index 5a3ca74..e9ce37e 100644
--- a/io_u.c
+++ b/io_u.c
@@ -168,9 +168,16 @@
 		goto ffz;
 
 	do {
-		r = os_random_long(&td->random_state);
+		if (td->o.use_os_rand) {
+			r = os_random_long(&td->random_state);
+			*b = (lastb - 1) * (r / ((unsigned long long) OS_RAND_MAX + 1.0));
+		} else {
+			r = __rand(&td->__random_state);
+			*b = (lastb - 1) * (r / ((unsigned long long) FRAND_MAX + 1.0));
+		}
+
 		dprint(FD_RANDOM, "off rand %llu\n", r);
-		*b = (lastb - 1) * (r / ((unsigned long long) OS_RAND_MAX + 1.0));
+
 
 		/*
 		 * if we are not maintaining a random map, we are done.