• Jens Axboe's avatar
    io_uring: add support for probing opcodes · 66f4af93
    Jens Axboe authored
    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: default avatarJens Axboe <axboe@kernel.dk>
    66f4af93
io_uring.c 156 KB