r = fallocate(f->fd, FALLOC_FL_KEEP_SIZE, 0,
f->real_file_size);
- if (r != 0) {
+ if (r != 0)
td_verror(td, errno, "fallocate");
- }
+
break;
#endif /* CONFIG_LINUX_FALLOCATE */
default:
seed = td->rand_seeds[4];
if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
- zipf_init(&f->zipf, nranges, td->o.zipf_theta, seed);
+ zipf_init(&f->zipf, nranges, td->o.zipf_theta.u.f, seed);
else
- pareto_init(&f->zipf, nranges, td->o.pareto_h, seed);
+ pareto_init(&f->zipf, nranges, td->o.pareto_h.u.f, seed);
return 1;
}
log_err("fio: zipf theta must different than 1.0\n");
return 1;
}
- td->o.zipf_theta = val;
+ td->o.zipf_theta.u.f = val;
} else {
if (val <= 0.00 || val >= 1.00) {
log_err("fio: pareto input out of range (0 < input < 1.0)\n");
return 1;
}
- td->o.pareto_h = val;
+ td->o.pareto_h.u.f = val;
}
return 0;
#include "os/os.h"
#include "stat.h"
#include "gettime.h"
+#include "lib/ieee754.h"
/*
* What type of allocation to use for io buffers
unsigned int fsync_on_close;
unsigned int random_distribution;
- double zipf_theta;
- double pareto_h;
+ fio_fp64_t zipf_theta;
+ fio_fp64_t pareto_h;
unsigned int random_generator;