Track io_u state (free or in-flight)
That way we can catch proper use by fio, so we don't get stuck
in cleanup_pending_aio() if someone forgot to put_io_u() in an
error path.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.h b/fio.h
index aeb45bf..c168fe7 100644
--- a/fio.h
+++ b/fio.h
@@ -76,6 +76,11 @@
};
#endif
+enum {
+ IO_U_F_FREE = 1 << 0,
+ IO_U_F_FLIGHT = 1 << 1,
+};
+
/*
* The io unit
*/
@@ -124,6 +129,8 @@
unsigned int seen;
};
+ unsigned int flags;
+
struct fio_file *file;
struct list_head list;