-/* The caller must hold z->mutex. */
-static struct fio_zone_info *zbd_replay_write_order(struct thread_data *td,
- struct io_u *io_u,
- struct fio_zone_info *z)
-{
- const struct fio_file *f = io_u->file;
- const uint64_t min_bs = td->o.min_bs[DDIR_WRITE];
-
- if (!zbd_open_zone(td, f, z)) {
- zone_unlock(z);
- z = zbd_convert_to_open_zone(td, io_u);
- assert(z);
- }
-
- if (z->verify_block * min_bs >= z->capacity) {
- log_err("%s: %d * %"PRIu64" >= %"PRIu64"\n",
- f->file_name, z->verify_block, min_bs, z->capacity);
- /*
- * If the assertion below fails during a test run, adding
- * "--experimental_verify=1" to the command line may help.
- */
- assert(false);
- }
-
- io_u->offset = z->start + z->verify_block * min_bs;
- if (io_u->offset + io_u->buflen >= zbd_zone_capacity_end(z)) {
- log_err("%s: %llu + %llu >= %"PRIu64"\n",
- f->file_name, io_u->offset, io_u->buflen,
- zbd_zone_capacity_end(z));
- assert(false);
- }
- z->verify_block += io_u->buflen / min_bs;
-
- return z;
-}
-