From ed2eb8757093b67c85071de94a10f1e42164b4c6 Mon Sep 17 00:00:00 2001 From: Dmitry Fomichev Date: Wed, 27 Jan 2021 13:19:27 +0900 Subject: [PATCH] engines/libzbc: enable block backend 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 Reviewed-by: Shin'ichiro Kawasaki Signed-off-by: Jens Axboe --- engines/libzbc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/libzbc.c b/engines/libzbc.c index 552aab65..2aacf7bb 100644 --- a/engines/libzbc.c +++ b/engines/libzbc.c @@ -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); -- 2.25.1