X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=4a3716bfeb5c058c235e9e529e73c4addef210b2;hp=381bb654a6c1ca5cf6e833862f670b3743c23708;hb=ed33585509a97c4a65e46967cb49419b6a4f8870;hpb=e4413f05e5fe1ff50e5fa751b818b1f539a33120;ds=sidebyside diff --git a/init.c b/init.c index 381bb654..4a3716bf 100644 --- a/init.c +++ b/init.c @@ -402,11 +402,18 @@ static int fixup_options(struct thread_data *td) } /* - * only really works for sequential io for now, and with 1 file + * only really works with 1 file */ - if (o->zone_size && td_random(td) && o->open_files == 1) + if (o->zone_size && o->open_files == 1) o->zone_size = 0; + /* + * If zone_range isn't specified, backward compatibility dictates it + * should be made equal to zone_size. + */ + if (o->zone_size && !o->zone_range) + o->zone_range = o->zone_size; + /* * Reads can do overwrites, we always need to pre-create the file */