Skip to content

Commit

Permalink
zbd: do not reset extra zones in open conditions
Browse files Browse the repository at this point in the history
The commit 954217b ("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: 954217b ("zbd: Initialize open zones list referring zone status at fio start")
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
Reviewed-by: Niklas Cassel <[email protected]>
Signed-off-by: Vincent Fu <[email protected]>
  • Loading branch information
kawasaki authored and vincentkfu committed Jun 8, 2023
1 parent a480704 commit 8ac7688
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions zbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 8ac7688

Please sign in to comment.