fio: Generalize zonemode=zbd
authorDamien Le Moal <damien.lemoal@wdc.com>
Tue, 7 Apr 2020 01:58:57 +0000 (10:58 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 7 Apr 2020 20:47:01 +0000 (14:47 -0600)
commitb76949618d557bd63181245aa522ead9b92d274b
tree00f2b151976a1db76fb456a6b1b4af561657b1a0
parentebc403fe282864eddfd68ab1793f149a1b0eb1cd
fio: Generalize zonemode=zbd

Generalize the implementation of the zbd zonemode for non-linux systems
and Linux systems without the blkzoned.h header file (that is, linux
systems with a kernel predating v4.10 or kernels compiled without zoned
block device support).

The configuration option CONFIG_HAS_BLKZONED determines if the system
supports or not zoned block devices. This option can be set for Linux
only for now. If it is set, the file oslib/linux-blkzoned.c is compiled
and the 3 functions defined are used by the zbd.c code to determine a
block device zoned model, get zone information and reset zones.
For systems that do not set the CONFIG_HAS_BLKZONED option,
zonemode=zbd will be useable with regular block devices with the
zbd code emulating zones as is already done currently.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile
configure
fio.h
io_u.h
options.c
oslib/blkzoned.h [new file with mode: 0644]
oslib/linux-blkzoned.c [new file with mode: 0644]
t/run-fio-tests.py
zbd.c
zbd.h
zbd_types.h [new file with mode: 0644]