summaryrefslogtreecommitdiff
path: root/engines/libzbc.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2021-12-10 10:20:41 +0900
committerJens Axboe <axboe@kernel.dk>2021-12-09 21:34:21 -0700
commit79eb6c9a17de959d72ee51c601b2764225101282 (patch)
treeebbb4790d21e74aa2b6860e7da74c022a1feec3d /engines/libzbc.c
parentfab60fa78a1832c17f8bb200292ded4a8b3eb2a5 (diff)
downloadfio-79eb6c9a17de959d72ee51c601b2764225101282.tar.gz
fio-79eb6c9a17de959d72ee51c601b2764225101282.tar.bz2
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>
Diffstat (limited to 'engines/libzbc.c')
-rw-r--r--engines/libzbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/libzbc.c b/engines/libzbc.c
index abee2043..2bc2c7e0 100644
--- a/engines/libzbc.c
+++ b/engines/libzbc.c
@@ -85,7 +85,7 @@ static int libzbc_open_dev(struct thread_data *td, struct fio_file *f,
return -ENOMEM;
ret = zbc_open(f->file_name,
- flags | ZBC_O_DRV_BLOCK | ZBC_O_DRV_SCSI | ZBC_O_DRV_ATA,
+ flags | ZBC_O_DRV_SCSI | ZBC_O_DRV_ATA,
&ld->zdev);
if (ret) {
log_err("%s: zbc_open() failed, err=%d\n",