assert((io_u->flags & IO_U_F_FLIGHT) == 0);
io_u->flags |= IO_U_F_FLIGHT;
+ assert(io_u->file->flags & FIO_FILE_OPEN);
+
io_u->error = 0;
io_u->resid = 0;
int r;
td->io_u_queued++;
- if (td->io_u_queued > td->iodepth_batch) {
+ if (td->io_u_queued > td->o.iodepth_batch) {
r = td_io_commit(td);
if (r < 0)
return r;