summaryrefslogtreecommitdiff
path: root/engines/libzbc.c
diff options
context:
space:
mode:
authorNiklas Cassel <niklas.cassel@wdc.com>2021-06-14 13:49:04 +0000
committerJens Axboe <axboe@kernel.dk>2021-06-14 08:54:51 -0600
commit2c7dd23e5142e421723ede2557fe868ac32c8265 (patch)
tree7c4b7c9fda792a2f941ea26a70f36954fcec0188 /engines/libzbc.c
parent9db0cde87d1c928b9d629c6f1b0f8f2ed729d908 (diff)
downloadfio-2c7dd23e5142e421723ede2557fe868ac32c8265.tar.gz
fio-2c7dd23e5142e421723ede2557fe868ac32c8265.tar.bz2
zbd: remove zbd_zoned_model ZBD_IGNORE
For a job with zonemode=zbd, we do not want any file to be ignored. Each file's file type in that job should be supported by either zbd.c or the ioengine. If not, we should return an error. This way, ZBD_IGNORE becomes redundant and can be removed. By removing ZBD_IGNORE, we know that all files belonging to a job that has zonemode=zbd set, will either be a zoned block device, or emulate a zoned block device. This means that for jobs that have zonemode=zbd, f->zbd_info will always be non-NULL. This will make the zbd code slightly easier to reason about and to maintain. When removing zbd_zoned_model ZBD_IGNORE, define the new first enum value as 0x1, so that we avoid potential ABI problems with existing binaries. 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>
Diffstat (limited to 'engines/libzbc.c')
-rw-r--r--engines/libzbc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/libzbc.c b/engines/libzbc.c
index 3dde93db..7f2bc431 100644
--- a/engines/libzbc.c
+++ b/engines/libzbc.c
@@ -180,10 +180,8 @@ static int libzbc_get_zoned_model(struct thread_data *td, struct fio_file *f,
struct libzbc_data *ld;
int ret;
- if (f->filetype != FIO_TYPE_BLOCK && f->filetype != FIO_TYPE_CHAR) {
- *model = ZBD_IGNORE;
- return 0;
- }
+ if (f->filetype != FIO_TYPE_BLOCK && f->filetype != FIO_TYPE_CHAR)
+ return -EINVAL;
ret = libzbc_open_dev(td, f, &ld);
if (ret)