From: Jens Axboe Date: Fri, 4 Jan 2013 07:26:10 +0000 (+0100) Subject: zipf/pareto: use size= if given, not always device size X-Git-Tag: fio-2.0.13~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=898cf6c7c1c5bceb57a15e339beb343bec5478e7;p=fio.git zipf/pareto: use size= if given, not always device size We used the full device/file size for the zipf or pareto init, this breaks if size= is specifically given. This causes fio to generate offsets outside the specified size= range, and fio will then just exit. Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index 9d3e0626..be2eba52 100644 --- a/filesetup.c +++ b/filesetup.c @@ -910,7 +910,7 @@ static int __init_rand_distribution(struct thread_data *td, struct fio_file *f) range_size = min(td->o.min_bs[DDIR_READ], td->o.min_bs[DDIR_WRITE]); - nranges = (f->real_file_size + range_size - 1) / range_size; + nranges = (f->io_size + range_size - 1) / range_size; seed = jhash(f->file_name, strlen(f->file_name), 0) * td->thread_number; if (!td->o.rand_repeatable)