engines/io_uring: ensure sqe stores are ordered SQ ring tail update
[fio.git] / 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();