ioengines: libzbc: disable libzbc block backend driver
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Fri, 10 Dec 2021 01:20:41 +0000 (10:20 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 10 Dec 2021 04:34:21 +0000 (21:34 -0700)
commit79eb6c9a17de959d72ee51c601b2764225101282
treeebbb4790d21e74aa2b6860e7da74c022a1feec3d
parentfab60fa78a1832c17f8bb200292ded4a8b3eb2a5
ioengines: libzbc: disable libzbc block backend driver

libzbc includes 3 different internal backend drivers:
1) The block backend: this backend relies on the kernel SMR support and
   uses regular system calls.
2) The SCSI backend: this is a SG passthrough driver for SAS drives and
   for SATA drives accessible through an SMR compliant SAT (SCSI-to-ATA
   translation layer).
3) The ATA backend: this is a SG passthrough driver for SATA drives not
   handled by the system SAT (either kernel or HBA SAT)

libzbc automatically selects the internal backend driver, using the
first one that is detected as functional (tested in the same order shown
above).

When running on an SMR enabled system (SMR compliant HBA and kernel with
zoned block device support enabled), any fio job using the libzbc IO
engine will thus end up using the regular kernel IO path. This is silly:
for this IO path, the libaio or psync IO engines are far better (less
overhead and more functionalities). The libzbc IO engine should be
restricted to be a passthrough engine only, similarly to the sg engine.

Fix the libzbc engine to not allow the use of libzbc block backend
driver by removing the ZBC_O_DRV_BLOCK flag when opening the device.

Also adjust the test script t/zbd/run-tests-against-nullb to remove the
-l option to force the use of the libzbc IO engine as it will not work
anymore (since the nullb device is neither a SCSI nor an ATA device).

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Link: https://lore.kernel.org/r/20211210012041.310670-1-damien.lemoal@opensource.wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/libzbc.c
t/zbd/run-tests-against-nullb