Skip to content
Commit 1dbd023e authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: eliminate the need to track provided buffer ID separately



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>
parent 660cbfa2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment