From 2b9415ddc260726c3ea9ae3436826f9181811143 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 15 Jan 2019 22:06:05 -0700 Subject: [PATCH] engines/io_uring: ensure sqe stores are ordered SQ ring tail update Signed-off-by: Jens Axboe --- engines/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/io_uring.c b/engines/io_uring.c index 56af8d71..8c5d9deb 100644 --- a/engines/io_uring.c +++ b/engines/io_uring.c @@ -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(); -- 2.25.1