zbd: do not reset extra zones in open conditions
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 8 Jun 2023 07:06:03 +0000 (16:06 +0900)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 8 Jun 2023 18:39:07 +0000 (14:39 -0400)
The commit 954217b90191 ("zbd: Initialize open zones list referring zone
status at fio start") introduced zone resets for zones in open condition
which exceeds the limit of max_open_zones. However, this zone reset may
break data in the zones even when fio does no write to them. Avoid the
zone reset and report it as an error.

Fixes: 954217b90191 ("zbd: Initialize open zones list referring zone status at fio start")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
zbd.c

diff --git a/zbd.c b/zbd.c
index 7529e68bef76ba333a7573b73aceeee0391c1924..832868cb45fcf425b56aaf9cea1be2c9273ed772 100644 (file)
--- a/zbd.c
+++ b/zbd.c
@@ -1206,12 +1206,10 @@ int zbd_setup_files(struct thread_data *td)
                                continue;
                        /*
                         * If the number of open zones exceeds specified limits,
-                        * reset all extra open zones.
+                        * error out.
                         */
-                       if (zbd_reset_zone(td, f, z) < 0) {
-                               log_err("Failed to reest zone %d\n", zi);
-                               return 1;
-                       }
+                       log_err("Number of open zones exceeds max_open_zones limit\n");
+                       return 1;
                }
        }