engines/io_uring: ensure sqe stores are ordered SQ ring tail update
authorJens Axboe <axboe@kernel.dk>
Wed, 16 Jan 2019 05:06:05 +0000 (22:06 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Jan 2019 05:06:05 +0000 (22:06 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/io_uring.c

index 56af8d7..8c5d9de 100644 (file)
@@ -289,6 +289,8 @@ static enum fio_q_status fio_ioring_queue(struct thread_data *td,
        if (next_tail == *ring->head)
                return FIO_Q_BUSY;
 
+       /* ensure sqe stores are ordered with tail update */
+       write_barrier();
        ring->array[tail & ld->sq_ring_mask] = io_u->index;
        *ring->tail = next_tail;
        write_barrier();