X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=c0fa3cdae882b0a738dce77c07a585616c31e937;hp=580403dbc232aa8676d2a3933c3eac4a5f7e31a5;hb=a69c9b57ddcff0cfaa481578ecbc4630b27b971f;hpb=9916f60af6e7b1ca05a1568d22d4010d08130fd6 diff --git a/filesetup.c b/filesetup.c index 580403db..c0fa3cda 100644 --- a/filesetup.c +++ b/filesetup.c @@ -331,7 +331,7 @@ unsigned long long get_rand_file_size(struct thread_data *td) { unsigned long long ret, sized; uint64_t frand_max; - unsigned long r; + uint64_t r; frand_max = rand_max(&td->file_size_state); r = __rand(&td->file_size_state); @@ -1192,13 +1192,13 @@ bool pre_read_files(struct thread_data *td) static void __init_rand_distribution(struct thread_data *td, struct fio_file *f) { unsigned int range_size, seed; - unsigned long nranges; + uint64_t nranges; uint64_t fsize; range_size = min(td->o.min_bs[DDIR_READ], td->o.min_bs[DDIR_WRITE]); fsize = min(f->real_file_size, f->io_size); - nranges = (fsize + range_size - 1) / range_size; + nranges = (fsize + range_size - 1ULL) / range_size; seed = jhash(f->file_name, strlen(f->file_name), 0) * td->thread_number; if (!td->o.rand_repeatable)