summaryrefslogtreecommitdiff
path: root/src/setup.c
diff options
context:
space:
mode:
authorRoman Penyaev <rpenyaev@suse.de>2019-05-27 21:05:09 +0200
committerJens Axboe <axboe@kernel.dk>2019-05-27 14:54:14 -0600
commitdf23d2dec286697dd73568faf142466e8067844a (patch)
tree7562ea83aeb3a5e22c6f04b8257b03167c540fe8 /src/setup.c
parentd1432b199a541f3ef2e49778fc05a5f5e251a96d (diff)
downloadliburing-df23d2dec286697dd73568faf142466e8067844a.tar.gz
liburing-df23d2dec286697dd73568faf142466e8067844a.tar.bz2
liburing,queue,setup: handle IORING_SQ_NEED_WAKEUP for io_uring_submit()
Enter kernel only if SQ thread is off or wakeup is needed. Signed-off-by: Roman Penyaev <rpenyaev@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src/setup.c')
-rw-r--r--src/setup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/setup.c b/src/setup.c
index 73f35de..9da3c19 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -69,8 +69,10 @@ int io_uring_queue_mmap(int fd, struct io_uring_params *p, struct io_uring *ring
memset(ring, 0, sizeof(*ring));
ret = io_uring_mmap(fd, p, &ring->sq, &ring->cq);
- if (!ret)
+ if (!ret) {
+ ring->flags = p->flags;
ring->ring_fd = fd;
+ }
return ret;
}