engines/libzbc: enable block backend
authorDmitry Fomichev <dmitry.fomichev@wdc.com>
Wed, 27 Jan 2021 04:19:27 +0000 (13:19 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 29 Jan 2021 15:14:00 +0000 (08:14 -0700)
When opening a device, the current version of libzbc ioengine instructs
libzbc to only try SCSI and ATA backends for scanning the drive. This
prevents opening null_blk devices that fail to be accepted by the both
above mentioned backends and require the block backend to be enabled.

Set the appropriate flag to enable the block backend in zbc_open()
libzbc call.

Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/libzbc.c

index 552aab65242e634bf63ae05a0b8f957fc5dcc2d3..2aacf7bbebecd3ca0d2a5f11a5346ab26c429c86 100644 (file)
@@ -86,7 +86,8 @@ 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_SCSI | ZBC_O_DRV_ATA, &ld->zdev);
+                      flags | ZBC_O_DRV_BLOCK | ZBC_O_DRV_SCSI | ZBC_O_DRV_ATA,
+                      &ld->zdev);
        if (ret) {
                log_err("%s: zbc_open() failed, err=%d\n",
                        f->file_name, ret);