Skip to content

Commit f3abed7

Browse files
kawasakivincentkfu
authored andcommitted
zbd: do not check open zones status and limits when jobs do not write
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. Fixes: 954217b ("zbd: Initialize open zones list referring zone status at fio start") Fixes: 8ac7688 ("zbd: do not reset extra zones in open conditions") Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Reviewed-by: Niklas Cassel <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vincent Fu <[email protected]>
1 parent 187103a commit f3abed7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

zbd.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,16 @@ int zbd_setup_files(struct thread_data *td)
12641264
return 1;
12651265
}
12661266

1267+
/*
1268+
* If this job does not do write operations, skip open zone
1269+
* condition check.
1270+
*/
1271+
if (!td_write(td)) {
1272+
if (td->o.job_max_open_zones)
1273+
log_info("'job_max_open_zones' is valid only for write jobs\n");
1274+
continue;
1275+
}
1276+
12671277
/*
12681278
* The per job max open zones limit cannot be used without a
12691279
* global max open zones limit. (As the tracking of open zones

0 commit comments

Comments
 (0)