zipf/pareto: ensure that 0 isn't always the hottest block
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 688249bd8a727e7910d72388a829f7249b5ee059..551c5ffa3158859783d4475ab82c7c837b63cac5 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -238,7 +238,7 @@ static int __get_next_rand_offset_zipf(struct thread_data *td,
                                       struct fio_file *f, enum fio_ddir ddir,
                                       unsigned long long *b)
 {
-       *b = zipf_next(&td->zipf);
+       *b = zipf_next(&f->zipf);
        return 0;
 }
 
@@ -246,7 +246,7 @@ static int __get_next_rand_offset_pareto(struct thread_data *td,
                                         struct fio_file *f, enum fio_ddir ddir,
                                         unsigned long long *b)
 {
-       *b = pareto_next(&td->zipf);
+       *b = pareto_next(&f->zipf);
        return 0;
 }