Full readonly check
Both in core and in engines. To the extent possible, this should catch
even fio errors.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/ioengines.c b/ioengines.c
index 8e6fae2..cf8c2f1 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -157,6 +157,8 @@
int td_io_prep(struct thread_data *td, struct io_u *io_u)
{
+ fio_ro_check(td, io_u);
+
if (td->io_ops->prep)
return td->io_ops->prep(td, io_u);
@@ -182,13 +184,13 @@
{
int ret;
+ fio_ro_check(td, io_u);
+
assert((io_u->flags & IO_U_F_FLIGHT) == 0);
io_u->flags |= IO_U_F_FLIGHT;
assert(io_u->file->flags & FIO_FILE_OPEN);
- assert(!(io_u->ddir == DDIR_WRITE && !td_write(td)));
-
io_u->error = 0;
io_u->resid = 0;