[PATCH 08/12] ioengine: remove finish_zone()
Shin'ichiro Kawasaki <[email protected]> Fri, 9 Jan 2026 11:35:59 +0900
| Newsgroups | org.kernel.vger.fio |
|---|---|
| Message-ID | <[email protected]> |
Zone finish operation is no longer required, then the callback function finish_zone() of I/O engines is not required either. Remove it as well as its implementation libzbc_finish_zone() for libzbc engine. Also increment FIO_IOOPS_VERSION to note that struct ioengine_ops changed. Signed-off-by: Shin'ichiro Kawasaki <[email protected]> --- engines/libzbc.c | 34 ---------------------------------- ioengines.h | 4 +--- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/engines/libzbc.c b/engines/libzbc.c index 0fa6bfd1..1918bed7 100644 --- a/engines/libzbc.c +++ b/engines/libzbc.c @@ -350,39 +350,6 @@ static int libzbc_move_zone_wp(struct thread_data *td, struct fio_file *f, return -ret; } -static int libzbc_finish_zone(struct thread_data *td, struct fio_file *f, - uint64_t offset, uint64_t length) -{ - struct libzbc_data *ld = td->io_ops_data; - uint64_t sector = offset >> 9; - unsigned int nr_zones; - struct zbc_errno err; - int i, ret; - - assert(ld); - assert(ld->zdev); - - nr_zones = (length + td->o.zone_size - 1) / td->o.zone_size; - assert(nr_zones > 0); - - for (i = 0; i < nr_zones; i++, sector += td->o.zone_size >> 9) { - ret = zbc_finish_zone(ld->zdev, sector, 0); - if (ret) - goto err; - } - - return 0; - -err: - zbc_errno(ld->zdev, &err); - td_verror(td, errno, "zbc_finish_zone failed"); - if (err.sk) - log_err("%s: finish zone failed %s:%s\n", - f->file_name, - zbc_sk_str(err.sk), zbc_asc_ascq_str(err.asc_ascq)); - return -ret; -} - static int libzbc_get_max_open_zones(struct thread_data *td, struct fio_file *f, unsigned int *max_open_zones) { @@ -486,7 +453,6 @@ FIO_STATIC struct ioengine_ops ioengine = { .reset_wp = libzbc_reset_wp, .move_zone_wp = libzbc_move_zone_wp, .get_max_open_zones = libzbc_get_max_open_zones, - .finish_zone = libzbc_finish_zone, .queue = libzbc_queue, .flags = FIO_SYNCIO | FIO_NOEXTEND | FIO_RAWIO, }; diff --git a/ioengines.h b/ioengines.h index 3d220a73..fd2c1242 100644 --- a/ioengines.h +++ b/ioengines.h @@ -9,7 +9,7 @@ #include "zbd_types.h" #include "dataplacement.h" -#define FIO_IOOPS_VERSION 39 +#define FIO_IOOPS_VERSION 40 #ifndef CONFIG_DYNAMIC_ENGINES #define FIO_STATIC static @@ -65,8 +65,6 @@ struct ioengine_ops { unsigned int *); int (*get_max_active_zones)(struct thread_data *, struct fio_file *, unsigned int *); - int (*finish_zone)(struct thread_data *, struct fio_file *, - uint64_t, uint64_t); int (*fdp_fetch_ruhs)(struct thread_data *, struct fio_file *, struct fio_ruhs_info *); int option_struct_size; -- 2.49.0