Check for open files on io operations
[fio.git] / ioengines.c
index 185314f05fd41f7bb6291217012f8c7f6f3f8beb..b18bc9a2010efe7cd22cf5993e1e11d492976c35 100644 (file)
@@ -186,6 +186,8 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u)
        assert((io_u->flags & IO_U_F_FLIGHT) == 0);
        io_u->flags |= IO_U_F_FLIGHT;
 
        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;
 
        io_u->error = 0;
        io_u->resid = 0;