-static void zipf_load_gen_zeta(struct zipf_state *zs)
-{
- struct fio_zipf_disk f;
- char tmp[80];
- int fd;
-
- sprintf(tmp, "fio.zipf.%f.%llu", zs->theta, (unsigned long long) zs->nranges);
- fd = open(tmp, O_RDONLY);
- if (fd == -1) {
-punt:
- zipf_update(zs);
- return;
- }
-
- if (read(fd, &f, sizeof(f)) != sizeof(f)) {
- close(fd);
- goto punt;
- }
-
- close(fd);
-
- f.ver_magic = le64_to_cpu(f.ver_magic);
- f.nranges = le64_to_cpu(f.nranges);
- f.zetan = le64_to_cpu(f.zetan);
-
- if (f.ver_magic != FIO_ZIPF_MAGIC) {
- unlink(tmp);
- goto punt;
- }
-
- zs->zetan = fio_uint64_to_double(f.zetan);
- zs->nranges = f.nranges;
-}
-
-static void shared_rand_init(struct zipf_state *zs, unsigned long nranges)