Skip to content

Commit 84692a1

Browse files
joannekoongaxboe
authored andcommitted
io_uring/kbuf: remove obsolete buf_nr_pages and update comments
The buf_nr_pages field in io_buffer_list was previously used to determine whether the buffer list uses ring-provided buffers or classic provided buffers. This is now determined by checking the IOBL_BUF_RING flag. Remove the buf_nr_pages field and update related comments. Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent f779ac0 commit 84692a1

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

include/linux/io_uring_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ struct io_ring_ctx {
327327

328328
/*
329329
* Modifications are protected by ->uring_lock and ->mmap_lock.
330-
* The flags, buf_pages and buf_nr_pages fields should be stable
331-
* once published.
330+
* The buffer list's io mapped region should be stable once
331+
* published.
332332
*/
333333
struct xarray io_bl_xa;
334334

io_uring/kbuf.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ enum {
1414

1515
struct io_buffer_list {
1616
/*
17-
* If ->buf_nr_pages is set, then buf_pages/buf_ring are used. If not,
18-
* then these are classic provided buffers and ->buf_list is used.
17+
* If the IOBL_BUF_RING flag is set, then buf_ring is used. If not, then
18+
* these are classic provided buffers and ->buf_list is used.
1919
*/
2020
union {
2121
struct list_head buf_list;
@@ -27,7 +27,6 @@ struct io_buffer_list {
2727
__u16 bgid;
2828

2929
/* below is for ring provided buffers */
30-
__u16 buf_nr_pages;
3130
__u16 nr_entries;
3231
__u16 head;
3332
__u16 mask;

0 commit comments

Comments
 (0)