On Jan 21, 2025 / 09:17, Niklas Cassel wrote: > On Tue, Jan 21, 2025 at 05:39:12PM +0900, Shin'ichiro Kawasaki wrote: > > Currently, fio checks the conditions of each zone within the IO range at > > the job start. If a zone is in an open condition, it is added to the > > write target zone array. If the number of write target zones exceeds the > > max_open_zones or job_max_open_zones limit, fio terminates with the > > error message "Number of open zones exceeds max_open_zones limit". This > > check for zone condition and the resulting termination occur even when > > the job does not perform a write operation, leading to confusion among > > users. > > > > To avoid the confusion, skip the check when jobs do not perform write > > operations. Additionally, print the message to inform that the > > job_max_open_zones limit does not work for non-write jobs. > > > > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> > > --- > > zbd.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/zbd.c b/zbd.c > > index 8a092cbe..ee095b1d 100644 > > --- a/zbd.c > > +++ b/zbd.c > > @@ -1264,6 +1264,16 @@ int zbd_setup_files(struct thread_data *td) > > return 1; > > } > > > > + /* > > + * If this job does not do write operations, skip open zone > > + * condition check. > > + */ > > + if (!td_write(td)) { > > + if (td->o.job_max_open_zones) > > + log_info("'job_max_open_zones' is valid only for write jobs\n"); > > + continue; > > + } > > + > > zbd_setup_files() currently loops from f->min_zone to f->max_zone. > > Since this check is now skipped if the job does notdo write operations, > could perhaps zbd_setup_files() be changed to loop from f->write_min_zone > to f->write_max_zone instead? I don't think so. Actually, write_in_zone and write_max_zone are not the mebmer of struct fio_file. They are member of struct zoned_block_device_info, which is shared across jobs (td) and files (f). zbd_setup_files() is called in the loop for jobs (td), so I think the loop in zbd_setup_files() should refer to f->min_zone and f->max_zone, which are unique to each job (td) and file (f).