Skip to content

Commit f740433

Browse files
isilenceaxboe
authored andcommitted
io_uring: explain io_wq_work::cancel_seq placement
Add a comment on why we keep ->cancel_seq in struct io_wq_work instead of struct io_kiocb despite it needed only by io_uring but not io-wq. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/988e87eec9dc700b5dae933df3aefef303502f6c.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 10003ec commit f740433

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

io_uring/io-wq.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ struct io_wq_work_node *wq_stack_extract(struct io_wq_work_node *stack)
155155
struct io_wq_work {
156156
struct io_wq_work_node list;
157157
unsigned flags;
158+
/* place it here instead of io_kiocb as it fills padding and saves 4B */
158159
int cancel_seq;
159160
};
160161

0 commit comments

Comments
 (0)