Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io-uring: move `struct io_br_sel` into io_uring_types.h

Move `struct io_br_sel` into io_uring_types.h and prepare for supporting
provided buffer on uring_cmd.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250821040210.1152145-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Ming Lei and committed by
Jens Axboe
d589bcdd fe524b06

+19 -18
+19
include/linux/io_uring_types.h
··· 86 86 }; 87 87 88 88 /* 89 + * Return value from io_buffer_list selection, to avoid stashing it in 90 + * struct io_kiocb. For legacy/classic provided buffers, keeping a reference 91 + * across execution contexts are fine. But for ring provided buffers, the 92 + * list may go away as soon as ->uring_lock is dropped. As the io_kiocb 93 + * persists, it's better to just keep the buffer local for those cases. 94 + */ 95 + struct io_br_sel { 96 + struct io_buffer_list *buf_list; 97 + /* 98 + * Some selection parts return the user address, others return an error. 99 + */ 100 + union { 101 + void __user *addr; 102 + ssize_t val; 103 + }; 104 + }; 105 + 106 + 107 + /* 89 108 * Arbitrary limit, can be raised if need be 90 109 */ 91 110 #define IO_RINGFD_REG_MAX 16
-18
io_uring/kbuf.h
··· 62 62 unsigned short partial_map; 63 63 }; 64 64 65 - /* 66 - * Return value from io_buffer_list selection, to avoid stashing it in 67 - * struct io_kiocb. For legacy/classic provided buffers, keeping a reference 68 - * across execution contexts are fine. But for ring provided buffers, the 69 - * list may go away as soon as ->uring_lock is dropped. As the io_kiocb 70 - * persists, it's better to just keep the buffer local for those cases. 71 - */ 72 - struct io_br_sel { 73 - struct io_buffer_list *buf_list; 74 - /* 75 - * Some selection parts return the user address, others return an error. 76 - */ 77 - union { 78 - void __user *addr; 79 - ssize_t val; 80 - }; 81 - }; 82 - 83 65 struct io_br_sel io_buffer_select(struct io_kiocb *req, size_t *len, 84 66 unsigned buf_group, unsigned int issue_flags); 85 67 int io_buffers_select(struct io_kiocb *req, struct buf_sel_arg *arg,