libiscsi: continue working when meets EINTR or EAGAIN
[fio.git] / engines / posixaio.c
index e5411b75363ce0cac218eeeffbaf8771a3b50804..82c6aa65b82fbada14192b32b6c8b29a03e03646 100644 (file)
@@ -109,7 +109,7 @@ static int fio_posixaio_getevents(struct thread_data *td, unsigned int min,
 
        r = 0;
 restart:
-       memset(suspend_list, 0, sizeof(*suspend_list));
+       memset(suspend_list, 0, sizeof(suspend_list));
        suspend_entries = 0;
        io_u_qiter(&td->io_u_all, io_u, i) {
                int err;
@@ -166,8 +166,8 @@ static struct io_u *fio_posixaio_event(struct thread_data *td, int event)
        return pd->aio_events[event];
 }
 
-static int fio_posixaio_queue(struct thread_data *td,
-                             struct io_u *io_u)
+static enum fio_q_status fio_posixaio_queue(struct thread_data *td,
+                                           struct io_u *io_u)
 {
        struct posixaio_data *pd = td->io_ops_data;
        os_aiocb_t *aiocb = &io_u->aiocb;
@@ -243,6 +243,7 @@ static int fio_posixaio_init(struct thread_data *td)
 static struct ioengine_ops ioengine = {
        .name           = "posixaio",
        .version        = FIO_IOOPS_VERSION,
+       .flags          = FIO_ASYNCIO_SYNC_TRIM,
        .init           = fio_posixaio_init,
        .prep           = fio_posixaio_prep,
        .queue          = fio_posixaio_queue,