zbd: allow zonemode=zbd with regular files by emulating zones
authorNiklas Cassel <niklas.cassel@wdc.com>
Mon, 14 Jun 2021 13:49:04 +0000 (13:49 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 14 Jun 2021 14:54:49 +0000 (08:54 -0600)
commit9db0cde87d1c928b9d629c6f1b0f8f2ed729d908
tree6966cf4fcd49b17f9cd2c10d45df7b3a429eaf33
parent50cc48d52fec6c74a46e377b23f19ebed532125a
zbd: allow zonemode=zbd with regular files by emulating zones

Currently when using zonemode=zbd and running against a regular file,
fio will fail with:
fio: file hash not empty on exit

Treat regular files just like how we treat regular (non-zoned) block
devices: return ZBD_NONE and let zbd.c emulate zones inside the regular
file/block device.

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>
zbd.c
zbd_types.h