projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
af8c0b4
)
[PATCH] rwmix seed got broken with random abstraction, fixup
author
Jens Axboe
<axboe@suse.de>
Wed, 7 Jun 2006 20:42:37 +0000
(22:42 +0200)
committer
Jens Axboe
<axboe@suse.de>
Wed, 7 Jun 2006 20:42:37 +0000
(22:42 +0200)
fio.c
patch
|
blob
|
blame
|
history
diff --git
a/fio.c
b/fio.c
index 8c48a71c0481b69c8a1235d6a53f481c8bb3279c..aa5071ca527e7d77817b6ffefb2270171f9254e8 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-360,11
+360,11
@@
static int get_rw_ddir(struct thread_data *td)
* Check if it's time to seed a new data direction.
*/
if (elapsed >= td->rwmixcycle) {
-
unsigned long
v;
+
int
v;
long r;
- r = os_random_long(&td->r
andom
_state);
- v = 1
00UL * r / (unsigned long) (RAND_MAX + 1.0
);
+ r = os_random_long(&td->r
wmix
_state);
+ v = 1
+ (int) (100.0 * (r / (RAND_MAX + 1.0))
);
if (v < td->rwmixread)
td->rwmix_ddir = DDIR_READ;
else