Remove use of OS provided random functions
We added the internal random generator a long time ago, and kept
the OS variant around as an opt-in feature with using use_os_rand=1.
We defaulted to using the fio provided one, and I doubt that
anyone has used the option.
The time has come to kill it.
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/trim.c b/trim.c
index a7f1b86..a15263d 100644
--- a/trim.c
+++ b/trim.c
@@ -75,13 +75,8 @@
if (!td->o.trim_percentage)
return 0;
- if (td->o.use_os_rand) {
- r = os_random_long(&td->trim_state);
- val = (OS_RAND_MAX / 100ULL);
- } else {
- r = __rand(&td->__trim_state);
- val = (FRAND_MAX / 100ULL);
- }
+ r = __rand(&td->__trim_state);
+ val = (FRAND_MAX / 100ULL);
val *= (unsigned long long) td->o.trim_percentage;
return r <= val;