engines/io_uring: don't use abs() on an unsigned value
[fio.git] / zbd.c
diff --git a/zbd.c b/zbd.c
index 7577472e9f8f035d8a9fe2709b2244aa72238b8e..8a092cbe61db346330ed3a6e618db4fb4efb0d4c 100644 (file)
--- a/zbd.c
+++ b/zbd.c
@@ -104,8 +104,7 @@ static void zone_lock(struct thread_data *td, const struct fio_file *f,
                      struct fio_zone_info *z)
 {
 #ifndef NDEBUG
-       struct zoned_block_device_info *zbd = f->zbd_info;
-       uint32_t const nz = z - zbd->zone_info;
+       unsigned int const nz = zbd_zone_idx(f, z);
        /* A thread should never lock zones outside its working area. */
        assert(f->min_zone <= nz && nz < f->max_zone);
        assert(z->has_wp);
@@ -1362,9 +1361,6 @@ void zbd_file_reset(struct thread_data *td, struct fio_file *f)
        if (td->o.verify != VERIFY_NONE) {
                verify_data_left = td->runstate == TD_VERIFYING ||
                        td->io_hist_len || td->verify_batch;
-               if (td->io_hist_len && td->o.verify_backlog)
-                       verify_data_left =
-                               td->io_hist_len % td->o.verify_backlog;
                if (!verify_data_left)
                        zbd_reset_zones(td, f, zb, ze);
        }