]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
io_uring: remove iopoll_queue from struct io_issue_def
authorCaleb Sander Mateos <csander@purestorage.com>
Mon, 2 Mar 2026 17:29:11 +0000 (10:29 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Mar 2026 22:14:14 +0000 (16:14 -0600)
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>
io_uring/io_uring.c
io_uring/opdef.c
io_uring/opdef.h

index a610eaa5fd7c306c6e74447699d1aa02246efed0..64ba359878a1528a4b381dea71e9ac1df99ceb7b 100644 (file)
@@ -1417,8 +1417,7 @@ static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags)
        if (ret == IOU_ISSUE_SKIP_COMPLETE) {
                ret = 0;
 
-               /* If the op doesn't have a file, we're not polling for it */
-               if ((req->flags & REQ_F_IOPOLL) && def->iopoll_queue)
+               if (req->flags & REQ_F_IOPOLL)
                        io_iopoll_req_issued(req, issue_flags);
        }
        return ret;
index 645980fa465166651c9fbfc337200d1dac8174f8..c3ef52b7081132fa01dec4d96f0615fdfe3b4348 100644 (file)
@@ -67,7 +67,6 @@ const struct io_issue_def io_issue_defs[] = {
                .audit_skip             = 1,
                .ioprio                 = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .vectored               = 1,
                .async_size             = sizeof(struct io_async_rw),
                .prep                   = io_prep_readv,
@@ -82,7 +81,6 @@ const struct io_issue_def io_issue_defs[] = {
                .audit_skip             = 1,
                .ioprio                 = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .vectored               = 1,
                .async_size             = sizeof(struct io_async_rw),
                .prep                   = io_prep_writev,
@@ -102,7 +100,6 @@ const struct io_issue_def io_issue_defs[] = {
                .audit_skip             = 1,
                .ioprio                 = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .async_size             = sizeof(struct io_async_rw),
                .prep                   = io_prep_read_fixed,
                .issue                  = io_read_fixed,
@@ -116,7 +113,6 @@ const struct io_issue_def io_issue_defs[] = {
                .audit_skip             = 1,
                .ioprio                 = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .async_size             = sizeof(struct io_async_rw),
                .prep                   = io_prep_write_fixed,
                .issue                  = io_write_fixed,
@@ -250,7 +246,6 @@ const struct io_issue_def io_issue_defs[] = {
                .audit_skip             = 1,
                .ioprio                 = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .async_size             = sizeof(struct io_async_rw),
                .prep                   = io_prep_read,
                .issue                  = io_read,
@@ -264,7 +259,6 @@ const struct io_issue_def io_issue_defs[] = {
                .audit_skip             = 1,
                .ioprio                 = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .async_size             = sizeof(struct io_async_rw),
                .prep                   = io_prep_write,
                .issue                  = io_write,
@@ -423,7 +417,6 @@ const struct io_issue_def io_issue_defs[] = {
                .needs_file             = 1,
                .plug                   = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .async_size             = sizeof(struct io_async_cmd),
                .prep                   = io_uring_cmd_prep,
                .issue                  = io_uring_cmd,
@@ -556,7 +549,6 @@ const struct io_issue_def io_issue_defs[] = {
                .audit_skip             = 1,
                .ioprio                 = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .vectored               = 1,
                .async_size             = sizeof(struct io_async_rw),
                .prep                   = io_prep_readv_fixed,
@@ -571,7 +563,6 @@ const struct io_issue_def io_issue_defs[] = {
                .audit_skip             = 1,
                .ioprio                 = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .vectored               = 1,
                .async_size             = sizeof(struct io_async_rw),
                .prep                   = io_prep_writev_fixed,
@@ -593,7 +584,6 @@ const struct io_issue_def io_issue_defs[] = {
                .needs_file             = 1,
                .plug                   = 1,
                .iopoll                 = 1,
-               .iopoll_queue           = 1,
                .is_128                 = 1,
                .async_size             = sizeof(struct io_async_cmd),
                .prep                   = io_uring_cmd_prep,
index faf3955dce8b914924b77c3f617d70b822a4930d..667f981e63b05dab6f052e8b9978f32f8afc01b5 100644 (file)
@@ -25,8 +25,6 @@ struct io_issue_def {
        unsigned                poll_exclusive : 1;
        /* skip auditing */
        unsigned                audit_skip : 1;
-       /* have to be put into the iopoll list */
-       unsigned                iopoll_queue : 1;
        /* vectored opcode, set if 1) vectored, and 2) handler needs to know */
        unsigned                vectored : 1;
        /* set to 1 if this opcode uses 128b sqes in a mixed sq */