aboutsummaryrefslogtreecommitdiff
path: root/utils/fio/patches/010-rand.patch
blob: 46aa39f5b9cc777d32796d83bd12d6f30bb90a5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- a/t/io_uring.c
+++ b/t/io_uring.c
@@ -63,7 +63,6 @@ struct file {
 struct submitter {
 	pthread_t thread;
 	int ring_fd;
-	struct drand48_data rand;
 	struct io_sq_ring sq_ring;
 	struct io_uring_sqe *sqes;
 	struct io_cq_ring cq_ring;
@@ -170,7 +169,7 @@ static void init_io(struct submitter *s, unsigned index)
 	}
 	f->pending_ios++;
 
-	lrand48_r(&s->rand, &r);
+	r = lrand48();
 	offset = (r % (f->max_blocks - 1)) * BS;
 
 	if (register_files) {
@@ -286,7 +285,7 @@ static void *submitter_fn(void *data)
 
 	printf("submitter=%d\n", gettid());
 
-	srand48_r(pthread_self(), &s->rand);
+	srand48(pthread_self());
 
 	prepped = 0;
 	do {