]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: add support for probing opcodes
authorJens Axboe <axboe@kernel.dk>
Thu, 16 Jan 2020 22:36:52 +0000 (15:36 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Jan 2020 00:04:06 +0000 (17:04 -0700)
commit167aa92d196afae99c2a9197192c8508024fa6d6
tree244089b13c38acd506861d17911e184f00ca2c3e
parent3a93ea3b10623cda07d0017cf9d9388334a37461
io_uring: add support for probing opcodes

The application currently has no way of knowing if a given opcode is
supported or not without having to try and issue one and see if we get
-EINVAL or not. And even this approach is fraught with peril, as maybe
we're getting -EINVAL due to some fields being missing, or maybe it's
just not that easy to issue that particular command without doing some
other leg work in terms of setup first.

This adds IORING_REGISTER_PROBE, which fills in a structure with info
on what it supported or not. This will work even with sparse opcode
fields, which may happen in the future or even today if someone
backports specific features to older kernels.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h