Skip to content

Commit 7995be4

Browse files
calebsanderaxboe
authored andcommitted
io_uring: remove iopoll_queue from struct io_issue_def
The opcode iopoll_queue flag is now redundant with REQ_F_IOPOLL. Only io_{read,write}{,_fixed}() and io_uring_cmd() set the REQ_F_IOPOLL flag, and the opcodes with these ->issue() implementations are precisely the ones that set iopoll_queue. So don't bother checking the iopoll_queue flag in io_issue_sqe(). Remove the unused flag from struct io_issue_def. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Link: https://patch.msgid.link/20260302172914.2488599-3-csander@purestorage.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 9165dc4 commit 7995be4

3 files changed

Lines changed: 1 addition & 14 deletions

File tree

io_uring/io_uring.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,8 +1417,7 @@ static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags)
14171417
if (ret == IOU_ISSUE_SKIP_COMPLETE) {
14181418
ret = 0;
14191419

1420-
/* If the op doesn't have a file, we're not polling for it */
1421-
if ((req->flags & REQ_F_IOPOLL) && def->iopoll_queue)
1420+
if (req->flags & REQ_F_IOPOLL)
14221421
io_iopoll_req_issued(req, issue_flags);
14231422
}
14241423
return ret;

io_uring/opdef.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ const struct io_issue_def io_issue_defs[] = {
6767
.audit_skip = 1,
6868
.ioprio = 1,
6969
.iopoll = 1,
70-
.iopoll_queue = 1,
7170
.vectored = 1,
7271
.async_size = sizeof(struct io_async_rw),
7372
.prep = io_prep_readv,
@@ -82,7 +81,6 @@ const struct io_issue_def io_issue_defs[] = {
8281
.audit_skip = 1,
8382
.ioprio = 1,
8483
.iopoll = 1,
85-
.iopoll_queue = 1,
8684
.vectored = 1,
8785
.async_size = sizeof(struct io_async_rw),
8886
.prep = io_prep_writev,
@@ -102,7 +100,6 @@ const struct io_issue_def io_issue_defs[] = {
102100
.audit_skip = 1,
103101
.ioprio = 1,
104102
.iopoll = 1,
105-
.iopoll_queue = 1,
106103
.async_size = sizeof(struct io_async_rw),
107104
.prep = io_prep_read_fixed,
108105
.issue = io_read_fixed,
@@ -116,7 +113,6 @@ const struct io_issue_def io_issue_defs[] = {
116113
.audit_skip = 1,
117114
.ioprio = 1,
118115
.iopoll = 1,
119-
.iopoll_queue = 1,
120116
.async_size = sizeof(struct io_async_rw),
121117
.prep = io_prep_write_fixed,
122118
.issue = io_write_fixed,
@@ -250,7 +246,6 @@ const struct io_issue_def io_issue_defs[] = {
250246
.audit_skip = 1,
251247
.ioprio = 1,
252248
.iopoll = 1,
253-
.iopoll_queue = 1,
254249
.async_size = sizeof(struct io_async_rw),
255250
.prep = io_prep_read,
256251
.issue = io_read,
@@ -264,7 +259,6 @@ const struct io_issue_def io_issue_defs[] = {
264259
.audit_skip = 1,
265260
.ioprio = 1,
266261
.iopoll = 1,
267-
.iopoll_queue = 1,
268262
.async_size = sizeof(struct io_async_rw),
269263
.prep = io_prep_write,
270264
.issue = io_write,
@@ -423,7 +417,6 @@ const struct io_issue_def io_issue_defs[] = {
423417
.needs_file = 1,
424418
.plug = 1,
425419
.iopoll = 1,
426-
.iopoll_queue = 1,
427420
.async_size = sizeof(struct io_async_cmd),
428421
.prep = io_uring_cmd_prep,
429422
.issue = io_uring_cmd,
@@ -556,7 +549,6 @@ const struct io_issue_def io_issue_defs[] = {
556549
.audit_skip = 1,
557550
.ioprio = 1,
558551
.iopoll = 1,
559-
.iopoll_queue = 1,
560552
.vectored = 1,
561553
.async_size = sizeof(struct io_async_rw),
562554
.prep = io_prep_readv_fixed,
@@ -571,7 +563,6 @@ const struct io_issue_def io_issue_defs[] = {
571563
.audit_skip = 1,
572564
.ioprio = 1,
573565
.iopoll = 1,
574-
.iopoll_queue = 1,
575566
.vectored = 1,
576567
.async_size = sizeof(struct io_async_rw),
577568
.prep = io_prep_writev_fixed,
@@ -593,7 +584,6 @@ const struct io_issue_def io_issue_defs[] = {
593584
.needs_file = 1,
594585
.plug = 1,
595586
.iopoll = 1,
596-
.iopoll_queue = 1,
597587
.is_128 = 1,
598588
.async_size = sizeof(struct io_async_cmd),
599589
.prep = io_uring_cmd_prep,

io_uring/opdef.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ struct io_issue_def {
2525
unsigned poll_exclusive : 1;
2626
/* skip auditing */
2727
unsigned audit_skip : 1;
28-
/* have to be put into the iopoll list */
29-
unsigned iopoll_queue : 1;
3028
/* vectored opcode, set if 1) vectored, and 2) handler needs to know */
3129
unsigned vectored : 1;
3230
/* set to 1 if this opcode uses 128b sqes in a mixed sq */

0 commit comments

Comments
 (0)