summaryrefslogtreecommitdiff
path: root/zbd.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 /zbd.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 'zbd.c')
-rw-r--r--zbd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/zbd.c b/zbd.c
index d1db9adc..aab4d741 100644
--- a/zbd.c
+++ b/zbd.c
@@ -661,8 +661,6 @@ static int zbd_create_zone_info(struct thread_data *td, struct fio_file *f)
return ret;
switch (zbd_model) {
- case ZBD_IGNORE:
- return 0;
case ZBD_HOST_AWARE:
case ZBD_HOST_MANAGED:
ret = parse_zone_info(td, f);
@@ -680,6 +678,7 @@ static int zbd_create_zone_info(struct thread_data *td, struct fio_file *f)
return -EINVAL;
}
+ assert(f->zbd_info);
f->zbd_info->model = zbd_model;
ret = zbd_set_max_open_zones(td, f);