zbd: Add support for zoneskip option
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 29 Aug 2019 07:21:35 +0000 (16:21 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 29 Aug 2019 12:30:49 +0000 (06:30 -0600)
commit4d37720ae029bf66556e4f847628f8cb9f35ef47
tree748c97e35bd73d0b55d405a52141ed184d0768c8
parentd4e058cdbd53f34e844c04a0ff03aa5b49b75e8e
zbd: Add support for zoneskip option

To speed up device tests (performance and or quality validation) of very
large capacity block devices such as SMR disks, it is useful to allow
skipping some block ranges for sequential workloads. While the
zonemode=stridded implements such feature, it does not allow controlling
read operations in partially written zones of zoned block devices (i.e.
prevent reads after a zone write pointer) and can result in IO errors
if executed on a zoned block devices with zones already written.

To solve this problem, add support for the zoneskip option with
zonemode=zbd, allowing a sequential workload to skip zoneskip bytes once
a zone has been fully written or its data has been read. The zoneskip
option is ignored for random workloads.

For read workloads, zone skipping takes into account the read_beyond_wp
option to switch zone either when all valid data in the zone is read
(read_beyond_wp=0) or the entire zone has been read (read_beyond_wp=1).

Add test47 to t/zbd/test-zbd-support to test that zoneskip invalid
values are handled correctly.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.1
io_u.c
t/zbd/test-zbd-support
zbd.c
zbd.h