• J
    io_uring: add support for probing opcodes · b7e0b05d
    Jens Axboe 提交于
    to #26323588
    
    commit 66f4af93da5761d2fa05c0dc673a47003cdb9cfe upstream.
    
    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: NJens Axboe <axboe@kernel.dk>
    Signed-off-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
    Acked-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
    b7e0b05d
io_uring.c 156.3 KB