Fio 3.37
[fio.git] / zbd.c
diff --git a/zbd.c b/zbd.c
index 7577472e9f8f035d8a9fe2709b2244aa72238b8e..3741766051547fbc71a46ab42efe72a181826993 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);