fio: consolidate rand_seed to uint64_t

csscope showed rand_seed was defined 4 times - each a different type.
While they are used differently, the places where they overlap
should reference the same type. This patch makes three of them the same
as suggested by Jens Axboe.

Signed-off-by: Grant Grundler <grundler@chromium.org>

Updated by me to change rand_seed option to unsigned long long
and changes related to that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/cconv.c b/cconv.c
index 3f41ae4..0d30f07 100644
--- a/cconv.c
+++ b/cconv.c
@@ -119,7 +119,7 @@
 	o->do_disk_util = le32_to_cpu(top->do_disk_util);
 	o->override_sync = le32_to_cpu(top->override_sync);
 	o->rand_repeatable = le32_to_cpu(top->rand_repeatable);
-	o->rand_seed = le32_to_cpu(top->rand_seed);
+	o->rand_seed = le64_to_cpu(top->rand_seed);
 	o->use_os_rand = le32_to_cpu(top->use_os_rand);
 	o->log_avg_msec = le32_to_cpu(top->log_avg_msec);
 	o->norandommap = le32_to_cpu(top->norandommap);
@@ -285,7 +285,7 @@
 	top->do_disk_util = cpu_to_le32(o->do_disk_util);
 	top->override_sync = cpu_to_le32(o->override_sync);
 	top->rand_repeatable = cpu_to_le32(o->rand_repeatable);
-	top->rand_seed = cpu_to_le32(o->rand_seed);
+	top->rand_seed = __cpu_to_le64(o->rand_seed);
 	top->use_os_rand = cpu_to_le32(o->use_os_rand);
 	top->log_avg_msec = cpu_to_le32(o->log_avg_msec);
 	top->norandommap = cpu_to_le32(o->norandommap);
diff --git a/ioengine.h b/ioengine.h
index 949af91..0756bc7 100644
--- a/ioengine.h
+++ b/ioengine.h
@@ -56,7 +56,7 @@
 	/*
 	 * Initial seed for generating the buffer contents
 	 */
-	unsigned long rand_seed;
+	uint64_t rand_seed;
 
 	/*
 	 * IO engine state, may be different from above when we get
diff --git a/options.c b/options.c
index 525d318..8287011 100644
--- a/options.c
+++ b/options.c
@@ -1656,7 +1656,7 @@
 	{
 		.name	= "randseed",
 		.lname	= "The random generator seed",
-		.type	= FIO_OPT_INT,
+		.type	= FIO_OPT_STR_VAL,
 		.off1	= td_var_offset(rand_seed),
 		.help	= "Set the random generator seed value",
 		.parent = "rw",
diff --git a/thread_options.h b/thread_options.h
index 2f807cd..79c3a89 100644
--- a/thread_options.h
+++ b/thread_options.h
@@ -100,7 +100,7 @@
 	unsigned int do_disk_util;
 	unsigned int override_sync;
 	unsigned int rand_repeatable;
-	unsigned int rand_seed;
+	unsigned long long rand_seed;
 	unsigned int use_os_rand;
 	unsigned int log_avg_msec;
 	unsigned int norandommap;
@@ -324,7 +324,7 @@
 	uint32_t do_disk_util;
 	uint32_t override_sync;
 	uint32_t rand_repeatable;
-	uint32_t rand_seed;
+	uint64_t rand_seed;
 	uint32_t use_os_rand;
 	uint32_t log_avg_msec;
 	uint32_t norandommap;