summaryrefslogtreecommitdiff
path: root/zbd.c
diff options
context:
space:
mode:
authorNiklas Cassel <niklas.cassel@wdc.com>2021-05-27 11:12:32 +0000
committerJens Axboe <axboe@kernel.dk>2021-05-27 16:04:58 -0600
commit575686bb85fa36f326524c505e83c54abc0d2f2b (patch)
tree12617884be77291166fd3f28eb4f706aef101a82 /zbd.c
parent6df25f781e07e373833ec1629e005d36474c3b67 (diff)
downloadfio-575686bb85fa36f326524c505e83c54abc0d2f2b.tar.gz
fio-575686bb85fa36f326524c505e83c54abc0d2f2b.tar.bz2
zbd: add a new --ignore_zone_limits option
In commit d2f442bc0bd5 ("ioengines: add get_max_open_zones zoned block device operation") we added a check that verifies that the specified --max_open_zones value is lower than the max value reported by the device. For ZNS devices there is a max open zones and a max active zones limit. For ZAC/ZBC devices there is only a max open zones limit. On ZAC/ZBC, there is thus no limit on the amount of zones that can be in zone state closed. When doing a write to an empty or closed zone, a ZAC/ZBC drive will close an arbitrary implicit open zone in order to handle the write. The ZNS specification has no requirement on closing a zone in order to handle a write to an empty or closed zone. The drive is free to return an error. Even on ZAC/ZBC, you do not want to exceed the max open zones limit, since it will lead to additional implicit close zone and implicit open zone operations, which may degrade performance. However, it seems that this is sometimes done on purpose, in order to measure the overhead of these additional operations. Therefore, add an option that allows the user to ignore the reported device limits. Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'zbd.c')
-rw-r--r--zbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zbd.c b/zbd.c
index 68cd58e1..5d9e331a 100644
--- a/zbd.c
+++ b/zbd.c
@@ -588,7 +588,7 @@ static int zbd_set_max_open_zones(struct thread_data *td, struct fio_file *f)
unsigned int max_open_zones;
int ret;
- if (zbd->model != ZBD_HOST_MANAGED) {
+ if (zbd->model != ZBD_HOST_MANAGED || td->o.ignore_zone_limits) {
/* Only host-managed devices have a max open limit */
zbd->max_open_zones = td->o.max_open_zones;
goto out;