* read from disk.
*/
for_each_file(td, f, i) {
+ if (!(f->flags & FIO_FILE_OPEN))
+ continue;
if (fio_io_sync(td, f))
break;
if (file_invalidate_cache(td, f))
if (should_fsync(td) && td->end_fsync) {
td_set_runstate(td, TD_FSYNCING);
- for_each_file(td, f, i)
+
+ for_each_file(td, f, i) {
+ if (!(f->flags & FIO_FILE_OPEN))
+ continue;
fio_io_sync(td, f);
+ }
}
} else
cleanup_pending_aio(td);
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;