Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/query: return number of available queries

It's useful to know which query opcodes are available. Extend the
structure and return that. It's a trivial change, and even though it can
be painlessly extended later, it'd still require adding a v2 of the
structure.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
6a77267d d3c9c213

+5
+3
include/uapi/linux/io_uring/query.h
··· 36 36 __u64 enter_flags; 37 37 /* Bitmask of all supported IOSQE_* flags */ 38 38 __u64 sqe_flags; 39 + /* The number of available query opcodes */ 40 + __u32 nr_query_opcodes; 41 + __u32 __pad; 39 42 }; 40 43 41 44 #endif
+2
io_uring/query.c
··· 20 20 e->ring_setup_flags = IORING_SETUP_FLAGS; 21 21 e->enter_flags = IORING_ENTER_FLAGS; 22 22 e->sqe_flags = SQE_VALID_FLAGS; 23 + e->nr_query_opcodes = __IO_URING_QUERY_MAX; 24 + e->__pad = 0; 23 25 return sizeof(*e); 24 26 } 25 27