zbd: add a new --ignore_zone_limits option
authorNiklas Cassel <niklas.cassel@wdc.com>
Thu, 27 May 2021 11:12:32 +0000 (11:12 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 May 2021 22:04:58 +0000 (16:04 -0600)
commit575686bb85fa36f326524c505e83c54abc0d2f2b
tree12617884be77291166fd3f28eb4f706aef101a82
parent6df25f781e07e373833ec1629e005d36474c3b67
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>
cconv.c
fio.1
options.c
server.h
thread_options.h
zbd.c