• Jens Axboe's avatar
    io_uring: eliminate the need to track provided buffer ID separately · 1dbd023e
    Jens Axboe authored
    We have io_kiocb->buf_index which is used for either fixed buffers, or
    for provided buffers. For the latter, it's used to hold the buffer group
    ID for buffer selection. Post selection, req->kbuf->bid is used to get
    the buffer ID.
    
    Store the buffer ID, when selected, in req->buf_index. If we do end up
    recycling the buffer, reset it back to the buffer group ID.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    1dbd023e
io_uring.c 297 KB