From nobody Fri Apr 3 07:59:11 2026 Received: from mail-qt1-f226.google.com (mail-qt1-f226.google.com [209.85.160.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD30122AE65 for ; Thu, 19 Feb 2026 01:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.226 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771465428; cv=none; b=mPvTB4v3g18MAlrUQFf5yot58M3+kAAi7rOtnq7sGy72h7/2Sz5zQ8QQYF3rMr8vD2oe8JkDtSMiATCH31iQztdFigzpsPc61pHVmkMgLQgG8aOS++5C9HE8SvA93XZiZESd3O+AmNZyL/7fMjhsKnfZlrKwWjObCAUA6gqY6JY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771465428; c=relaxed/simple; bh=WyqlPBR88y34QAGXo3i1eSp+VVrTg+J0xmwDUpAW69g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EcnHwG8kcDZRHsLEB9KssBH9lKTHdB4W1QivgyMGOXkAaoxWRrf55oToNlFqf9ok8vG+eeDicIv9xGHSgXOMrZjCD3x0tTBfvzE2eRZc1h9RXT8QoOXrZBlDRDSV91+REcO1ay6vrEsF5Wu+xBGqmmanwELi23ZFJCL9AVgDmXs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=AZmBnIUL; arc=none smtp.client-ip=209.85.160.226 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="AZmBnIUL" Received: by mail-qt1-f226.google.com with SMTP id d75a77b69052e-506a65d8698so313851cf.3 for ; Wed, 18 Feb 2026 17:43:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771465425; x=1772070225; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EE7cGAhrUq0nrwHlvXRO9TAOek5hA0FaXj4t+R7Eq/M=; b=AZmBnIULMdFc3FNRtRgnf48wWbXMWsA9EraAOUZBdcN+9r6zCZUfF9CpTF6z7YP90O MHUxOAUaNs19JeVSG/Doit0/HabuD20Yzj8t7s/IinOybrQsG2jE4SD57aKaY3PkN/1j FGQHa/4AIQNMFGXQAkaKL8sVQ25yVkdhuNJqxaCrIdgW3QdfBa/Ae9wqDNGfrqSbkamU goUb6YcUD6SrWHocFXoFtBXFjYaCpgqFI0PNPnHKNx19K18vwAfpm9t81zM6KVxVTl0b pyNuMAEybcQomrfsydltFG7J39PIfoakjW6hR0fYw7IU5UoXfLlY+NvFwQyCUHq54mtJ vJjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771465425; x=1772070225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EE7cGAhrUq0nrwHlvXRO9TAOek5hA0FaXj4t+R7Eq/M=; b=Zl05J2rZ4gah03W3kZE3PS2G8IF+nB+CQKkTmBm3SJ+CVO0Y5KHBG1R/dV91mL4AqB ySMuAJ4hg8HoCJc0eHJp0mTsalfOjA0GPPgSCpoSQGH8mLhNPruuCMB2/aL5sG8ZASxT gNGR/u1ELESJVjVa+ndZ25mUeKytcIx7Q+qg0zk05HbEhyAwRmo3pQlHBH/9312aNUt7 DcJQu9CF/X/5fUNQVGtGXy4XB9uDrNcTNZxO79DEtIigQgvj/LzWXsNhsJEbnBkAMgak cdRwTjhxPMUyhf/XTD0VbHqJLFWoZiCPoX9PGhxG3C7ikQlwQuOiXQ0bNh/sUKitiAb2 l8JA== X-Forwarded-Encrypted: i=1; AJvYcCWL83/QOYfu44OW+mdX/Vu0fhZ/AIY7B46CFT4li3tlAfJ13mvGJgwIY0zP4FR18ZI5QhPdwQuoc9759mw=@vger.kernel.org X-Gm-Message-State: AOJu0YyB9zz71dZucrw4n4GgyvsFLgnC2/1/jwi4dAByscH2toeNQIwT oJ2Pg7Dr9Qd4Pli5epjLI5Hn99t9RWqowfy06I233sL9RVlpwSbpTSp6CPjBKbrPX4LsMTItxiB BwE8NZ+etkhTYisufvFLrirGto/qhtTiQ1H02aymA1vqPS6iD8Zsa X-Gm-Gg: AZuq6aIWXPLU5zqmS4XrtMtnxLFMEnzVaDSx4V4UH7/Z9IExtbGs2lGvDuwEdzmRV8l JtbiKStn0lDvgRlh95E3Zq9WOOg4lyQrK2b6/Ebr9fs9bL+/W4m9rVlTDVGza+lzGmAvchRNba0 aoO2+B2w8e+CTKQkTiRLBXolTEYXCMcdvpdg/3v8LbQmO8vo4ZFOUiVFIkwCy7yGua1ATlk0EpO 53+YXSYPP2McsJkozm6pKez0+kpHN9L6KJevlANwnKebhqpGec9zGxqcUNLvCEmlku3ePIspyS+ jH6r+NmJcWzWutjASYDOsyY7xSfGYjiIeYoMl3dKERTStcAskkQv0sT/vXPFAuSNMWx0bgBqSEV iBIYu5iYXeo1gqRDvCBWX3uYq8EEPP22oUV/layw= X-Received: by 2002:a0c:f94d:0:b0:899:555c:cb2a with SMTP id 6a1803df08f44-899555ccc78mr42192476d6.3.1771465424856; Wed, 18 Feb 2026 17:43:44 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([2620:125:9017:12:36:3:5:0]) by smtp-relay.gmail.com with ESMTPS id 6a1803df08f44-8971cd37abfsm28345806d6.16.2026.02.18.17.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Feb 2026 17:43:44 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.112.29.101]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id 7602434076F; Wed, 18 Feb 2026 18:43:43 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id 719CCE41D2F; Wed, 18 Feb 2026 18:43:43 -0700 (MST) From: Caleb Sander Mateos To: Jens Axboe , Christoph Hellwig , Keith Busch , Sagi Grimberg Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Caleb Sander Mateos Subject: [PATCH v2 1/4] io_uring: add REQ_F_IOPOLL Date: Wed, 18 Feb 2026 18:43:32 -0700 Message-ID: <20260219014335.9061-2-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260219014335.9061-1-csander@purestorage.com> References: <20260219014335.9061-1-csander@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A subsequent commit will allow uring_cmds to commands that don't implement ->uring_cmd_iopoll() to be issued to IORING_SETUP_IOPOLL io_urings. This means the ctx's IORING_SETUP_IOPOLL flag isn't sufficient to determine whether a given request needs to be iopolled. Introduce a request flag REQ_F_IOPOLL set in ->issue() if a request needs to be iopolled to completion. Set the flag in io_rw_init_file() and io_uring_cmd() for requests issued to IORING_SETUP_IOPOLL ctxs. Use the request flag instead of IORING_SETUP_IOPOLL in places dealing with a specific request. A future possibility would be to add an option to enable/disable iopoll in the io_uring SQE instead of determining it from IORING_SETUP_IOPOLL. Signed-off-by: Caleb Sander Mateos --- include/linux/io_uring_types.h | 3 +++ io_uring/io_uring.c | 9 ++++----- io_uring/rw.c | 11 ++++++----- io_uring/uring_cmd.c | 5 +++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h index 3e4a82a6f817..4563e1fafdf0 100644 --- a/include/linux/io_uring_types.h +++ b/include/linux/io_uring_types.h @@ -541,10 +541,11 @@ enum { REQ_F_BUFFERS_COMMIT_BIT, REQ_F_BUF_NODE_BIT, REQ_F_HAS_METADATA_BIT, REQ_F_IMPORT_BUFFER_BIT, REQ_F_SQE_COPIED_BIT, + REW_F_IOPOLL_BIT, =20 /* not a real bit, just to check we're not overflowing the space */ __REQ_F_LAST_BIT, }; =20 @@ -632,10 +633,12 @@ enum { * For SEND_ZC, whether to import buffers (i.e. the first issue). */ REQ_F_IMPORT_BUFFER =3D IO_REQ_FLAG(REQ_F_IMPORT_BUFFER_BIT), /* ->sqe_copy() has been called, if necessary */ REQ_F_SQE_COPIED =3D IO_REQ_FLAG(REQ_F_SQE_COPIED_BIT), + /* request must be iopolled to completion (set in ->issue()) */ + REQ_F_IOPOLL =3D IO_REQ_FLAG(REW_F_IOPOLL_BIT), }; =20 struct io_tw_req { struct io_kiocb *req; }; diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index ccab8562d273..43059f6e10e0 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -354,11 +354,10 @@ static struct io_kiocb *__io_prep_linked_timeout(stru= ct io_kiocb *req) } =20 static void io_prep_async_work(struct io_kiocb *req) { const struct io_issue_def *def =3D &io_issue_defs[req->opcode]; - struct io_ring_ctx *ctx =3D req->ctx; =20 if (!(req->flags & REQ_F_CREDS)) { req->flags |=3D REQ_F_CREDS; req->creds =3D get_current_cred(); } @@ -376,11 +375,11 @@ static void io_prep_async_work(struct io_kiocb *req) =20 /* don't serialize this request if the fs doesn't need it */ if (should_hash && (req->file->f_flags & O_DIRECT) && (req->file->f_op->fop_flags & FOP_DIO_PARALLEL_WRITE)) should_hash =3D false; - if (should_hash || (ctx->flags & IORING_SETUP_IOPOLL)) + if (should_hash || (req->flags & REQ_F_IOPOLL)) io_wq_hash_work(&req->work, file_inode(req->file)); } else if (!req->file || !S_ISBLK(file_inode(req->file)->i_mode)) { if (def->unbound_nonreg_file) atomic_or(IO_WQ_WORK_UNBOUND, &req->work.flags); } @@ -1417,11 +1416,11 @@ static int io_issue_sqe(struct io_kiocb *req, unsig= ned int issue_flags) =20 if (ret =3D=3D IOU_ISSUE_SKIP_COMPLETE) { ret =3D 0; =20 /* If the op doesn't have a file, we're not polling for it */ - if ((req->ctx->flags & IORING_SETUP_IOPOLL) && def->iopoll_queue) + if ((req->flags & REQ_F_IOPOLL) && def->iopoll_queue) io_iopoll_req_issued(req, issue_flags); } return ret; } =20 @@ -1433,11 +1432,11 @@ int io_poll_issue(struct io_kiocb *req, io_tw_token= _t tw) int ret; =20 io_tw_lock(req->ctx, tw); =20 WARN_ON_ONCE(!req->file); - if (WARN_ON_ONCE(req->ctx->flags & IORING_SETUP_IOPOLL)) + if (WARN_ON_ONCE(req->flags & REQ_F_IOPOLL)) return -EFAULT; =20 ret =3D __io_issue_sqe(req, issue_flags, &io_issue_defs[req->opcode]); =20 WARN_ON_ONCE(ret =3D=3D IOU_ISSUE_SKIP_COMPLETE); @@ -1531,11 +1530,11 @@ void io_wq_submit_work(struct io_wq_work *work) * We can get EAGAIN for iopolled IO even though we're * forcing a sync submission from here, since we can't * wait for request slots on the block side. */ if (!needs_poll) { - if (!(req->ctx->flags & IORING_SETUP_IOPOLL)) + if (!(req->flags & REQ_F_IOPOLL)) break; if (io_wq_worker_stopped()) break; cond_resched(); continue; diff --git a/io_uring/rw.c b/io_uring/rw.c index 1a5f262734e8..3bdb9914e673 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -502,11 +502,11 @@ static bool io_rw_should_reissue(struct io_kiocb *req) struct io_ring_ctx *ctx =3D req->ctx; =20 if (!S_ISBLK(mode) && !S_ISREG(mode)) return false; if ((req->flags & REQ_F_NOWAIT) || (io_wq_current_is_worker() && - !(ctx->flags & IORING_SETUP_IOPOLL))) + !(req->flags & REQ_F_IOPOLL))) return false; /* * If ref is dying, we might be running poll reap from the exit work. * Don't attempt to reissue from that path, just let it fail with * -EAGAIN. @@ -638,11 +638,11 @@ static inline void io_rw_done(struct io_kiocb *req, s= size_t ret) ret =3D -EINTR; break; } } =20 - if (req->ctx->flags & IORING_SETUP_IOPOLL) + if (req->flags & REQ_F_IOPOLL) io_complete_rw_iopoll(&rw->kiocb, ret); else io_complete_rw(&rw->kiocb, ret); } =20 @@ -652,11 +652,11 @@ static int kiocb_done(struct io_kiocb *req, ssize_t r= et, struct io_rw *rw =3D io_kiocb_to_cmd(req, struct io_rw); unsigned final_ret =3D io_fixup_rw_res(req, ret); =20 if (ret >=3D 0 && req->flags & REQ_F_CUR_POS) req->file->f_pos =3D rw->kiocb.ki_pos; - if (ret >=3D 0 && !(req->ctx->flags & IORING_SETUP_IOPOLL)) { + if (ret >=3D 0 && !(req->flags & REQ_F_IOPOLL)) { u32 cflags =3D 0; =20 __io_complete_rw_common(req, ret); /* * Safe to call io_end from here as we're inline @@ -874,10 +874,11 @@ static int io_rw_init_file(struct io_kiocb *req, fmod= e_t mode, int rw_type) req->flags |=3D REQ_F_NOWAIT; =20 if (ctx->flags & IORING_SETUP_IOPOLL) { if (!(kiocb->ki_flags & IOCB_DIRECT) || !file->f_op->iopoll) return -EOPNOTSUPP; + req->flags |=3D REQ_F_IOPOLL; kiocb->private =3D NULL; kiocb->ki_flags |=3D IOCB_HIPRI; req->iopoll_completed =3D 0; if (ctx->flags & IORING_SETUP_HYBRID_IOPOLL) { /* make sure every req only blocks once*/ @@ -961,11 +962,11 @@ static int __io_read(struct io_kiocb *req, struct io_= br_sel *sel, if (ret =3D=3D -EAGAIN) { /* If we can poll, just do that. */ if (io_file_can_poll(req)) return -EAGAIN; /* IOPOLL retry should happen for io-wq threads */ - if (!force_nonblock && !(req->ctx->flags & IORING_SETUP_IOPOLL)) + if (!force_nonblock && !(req->flags & REQ_F_IOPOLL)) goto done; /* no retry on NONBLOCK nor RWF_NOWAIT */ if (req->flags & REQ_F_NOWAIT) goto done; ret =3D 0; @@ -1186,11 +1187,11 @@ int io_write(struct io_kiocb *req, unsigned int iss= ue_flags) /* no retry on NONBLOCK nor RWF_NOWAIT */ if (ret2 =3D=3D -EAGAIN && (req->flags & REQ_F_NOWAIT)) goto done; if (!force_nonblock || ret2 !=3D -EAGAIN) { /* IOPOLL retry should happen for io-wq threads */ - if (ret2 =3D=3D -EAGAIN && (req->ctx->flags & IORING_SETUP_IOPOLL)) + if (ret2 =3D=3D -EAGAIN && (req->flags & REQ_F_IOPOLL)) goto ret_eagain; =20 if (ret2 !=3D req->cqe.res && ret2 >=3D 0 && need_complete_io(req)) { trace_io_uring_short_write(req->ctx, kiocb->ki_pos - ret2, req->cqe.res, ret2); diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index ee7b49f47cb5..b651c63f6e20 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -108,11 +108,11 @@ void io_uring_cmd_mark_cancelable(struct io_uring_cmd= *cmd, * Doing cancelations on IOPOLL requests are not supported. Both * because they can't get canceled in the block stack, but also * because iopoll completion data overlaps with the hash_node used * for tracking. */ - if (ctx->flags & IORING_SETUP_IOPOLL) + if (req->flags & REQ_F_IOPOLL) return; =20 if (!(cmd->flags & IORING_URING_CMD_CANCELABLE)) { cmd->flags |=3D IORING_URING_CMD_CANCELABLE; io_ring_submit_lock(ctx, issue_flags); @@ -165,11 +165,11 @@ void __io_uring_cmd_done(struct io_uring_cmd *ioucmd,= s32 ret, u64 res2, if (req->ctx->flags & IORING_SETUP_CQE_MIXED) req->cqe.flags |=3D IORING_CQE_F_32; io_req_set_cqe32_extra(req, res2, 0); } io_req_uring_cleanup(req, issue_flags); - if (req->ctx->flags & IORING_SETUP_IOPOLL) { + if (req->flags & REQ_F_IOPOLL) { /* order with io_iopoll_req_issued() checking ->iopoll_complete */ smp_store_release(&req->iopoll_completed, 1); } else if (issue_flags & IO_URING_F_COMPLETE_DEFER) { if (WARN_ON_ONCE(issue_flags & IO_URING_F_UNLOCKED)) return; @@ -258,10 +258,11 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int i= ssue_flags) if (io_is_compat(ctx)) issue_flags |=3D IO_URING_F_COMPAT; if (ctx->flags & IORING_SETUP_IOPOLL) { if (!file->f_op->uring_cmd_iopoll) return -EOPNOTSUPP; + req->flags |=3D REQ_F_IOPOLL; issue_flags |=3D IO_URING_F_IOPOLL; req->iopoll_completed =3D 0; if (ctx->flags & IORING_SETUP_HYBRID_IOPOLL) { /* make sure every req only blocks once */ req->flags &=3D ~REQ_F_IOPOLL_STATE; --=20 2.45.2 From nobody Fri Apr 3 07:59:11 2026 Received: from mail-qv1-f99.google.com (mail-qv1-f99.google.com [209.85.219.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDA7D22F388 for ; Thu, 19 Feb 2026 01:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.99 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771465427; cv=none; b=tpwLEjOCqmxUflBBX6oC5nokanGTIPolx30xFCue+wOqNDUI13fNCGVFzkmWmCDLI/DEdDOfqvIfYArPSxMepGghn+De19Y/md1Cnjknjf55atZIOnE+TA0hf/f9XPRw3MmUzyU5ekB1fQBensOcif/FonTMW+l/VTBM9RW0x7o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771465427; c=relaxed/simple; bh=EHWMm11e5TVx8NT/hLERqyUnuuxjz5z5bCiInE9uL2M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L61NPGrffSWyAheJfbA3n5mibRopVf4NaSZ2/9I00AZzA/9YiOaBU5l9IRE1jpUqUhqRgbXY4fXhuRpLa/eeZI68/fp0afC8tCA6Ba9B3n3nvvdGXnRq3YnfKJFvfOqsJNsCObDX/vsKBOSKrf9kaRFdQbEIKG4aTbIxeE3JMwI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=RAsUNME5; arc=none smtp.client-ip=209.85.219.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="RAsUNME5" Received: by mail-qv1-f99.google.com with SMTP id 6a1803df08f44-8954d10e62dso764946d6.2 for ; Wed, 18 Feb 2026 17:43:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771465425; x=1772070225; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CUz10elldwZxLQFWq4Cian3B5sXmfA0qWI2X4aUf25A=; b=RAsUNME5Lq34d59skzAPAZjc5hZtWTK1Il+RSv0SxoV5jeQkYfmP48rqK7T3RnSkYz HxV/3KPu7TLfQ+4Nu7WfGCy37jteVCF4e1m6l93NmYec+wSX+m5hC8xjeNw25xXihLl4 X9UJJ+ZcXYnGT5k7xDBU9d4Z2BjcAz16uNS6ezD7IZHZ5r8YXWcGl4sCLmXY6SaSEkU3 L4g8nRUeBY6ZI2JO9rfgtDfQRi21cxSqBd+RHXy6t57xo6Ayhc10+PK9PM3IqLFVdaYU dTWdACa8hFKifcEWjX86M7AB4kIM/Q/Tnb278BZlk0pdN5Z8Q5uG8P05H5KABdzl+a50 m1pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771465425; x=1772070225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CUz10elldwZxLQFWq4Cian3B5sXmfA0qWI2X4aUf25A=; b=IG1LXGxGfEn+vdlXPGXe9HGtf8350lZkB2AAMTMV+rZu+c6Rcm1ppgKvLuy8m8nJF6 CAm549RcFIB6LihBm3Dl1HV8BPGAGfIr/XWhDEqv7APd9ZVSw2ox4qaKQj79gi1nm/ep 9KPaNcEQuMFC5WA8FQgdXXHCTrksUNrQ8AGSCPHC1anBawkNjc91DQd6e8svSX1rbudm O+PsAr+s8zmtzD85N7aiEXCuxIyxDNZyPx3k/kQ7iqMrDhv08WXmoV20yMvOq1JZc1LY EhylGBseOlozwZPLAFn/G+Bf0Hn4ojdS2f7pEIewi1ZM3HMDMqt2/GB7lHQgf6P/3I51 o3hg== X-Forwarded-Encrypted: i=1; AJvYcCXKaqBAUP2b2J+u+QXhQU/Uijbb0tH6J4MyxHeWJozSCa/1L/Wm/gsAPw0DBWlxZO8L92Dh3l1nFRT+ByY=@vger.kernel.org X-Gm-Message-State: AOJu0YwjxVVl5EEJkJsfuhYwOfHywPurYbA1gDIPmDLhz5YvpzH1K7Dq hzEPr017nDQCXCOqMHNsj5pO/0jmqvAfnm9CpUXdg8crLwIQD5XF3Skl4fUogk4BTV7MS//TgRt S36nHvQNwqWoMCra6CwVmyefaISN/mCmW9UJA X-Gm-Gg: AZuq6aILHSDb9YqsvcT0gCg308901Cw9KnbJ2nMbynUOTUyyDkk4r8DVQTlHrBUVO2m zlkr79Y4Hq9mY02Zc6S+MpY4Ej3t00SWsKYY8FaOdTLStiE44n/zktmgSn24r5VAuKe8aBfRxgJ 6qesXz5ctpMF2mpLf0pLWw2A873/pFY75a2iRvbZyptJLCV/IPlI0NKygEyBWLMN9UsNIHOfNr7 8POvZywPQIGr3Rl1PrFk4UIh1wkwqmf2hifQY7C4wPFnm9Xr3iXdXDFkyJaqSRgv8MxhjFXfNFU 5QA965Vy5s4PftLRlGxlCeR/pSgEsskRMJg1EgdzhidsUcRZ6ggsRrs73VHkyk5Odvjh98QH+jH JPxRX+KG5LMJ1xlf8g2J5PHSGlZnfp4QyQ6bvk+CZR/zdOnzuR42VUQ== X-Received: by 2002:a05:6214:4f05:b0:897:12e:8e8b with SMTP id 6a1803df08f44-897347e287emr204249686d6.7.1771465424836; Wed, 18 Feb 2026 17:43:44 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.128]) by smtp-relay.gmail.com with ESMTPS id 6a1803df08f44-8971cd37a80sm27810226d6.19.2026.02.18.17.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Feb 2026 17:43:44 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.112.29.101]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id AEB22342224; Wed, 18 Feb 2026 18:43:43 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id A9B98E41D2F; Wed, 18 Feb 2026 18:43:43 -0700 (MST) From: Caleb Sander Mateos To: Jens Axboe , Christoph Hellwig , Keith Busch , Sagi Grimberg Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Caleb Sander Mateos Subject: [PATCH v2 2/4] io_uring: remove iopoll_queue from struct io_issue_def Date: Wed, 18 Feb 2026 18:43:33 -0700 Message-ID: <20260219014335.9061-3-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260219014335.9061-1-csander@purestorage.com> References: <20260219014335.9061-1-csander@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- io_uring/io_uring.c | 3 +-- io_uring/opdef.c | 10 ---------- io_uring/opdef.h | 2 -- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 43059f6e10e0..2be46e11e1a7 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1415,12 +1415,11 @@ static int io_issue_sqe(struct io_kiocb *req, unsig= ned int issue_flags) } =20 if (ret =3D=3D IOU_ISSUE_SKIP_COMPLETE) { ret =3D 0; =20 - /* 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; } =20 diff --git a/io_uring/opdef.c b/io_uring/opdef.c index 91a23baf415e..4b3fb19b0cde 100644 --- a/io_uring/opdef.c +++ b/io_uring/opdef.c @@ -65,11 +65,10 @@ const struct io_issue_def io_issue_defs[] =3D { .buffer_select =3D 1, .plug =3D 1, .audit_skip =3D 1, .ioprio =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .vectored =3D 1, .async_size =3D sizeof(struct io_async_rw), .prep =3D io_prep_readv, .issue =3D io_read, }, @@ -80,11 +79,10 @@ const struct io_issue_def io_issue_defs[] =3D { .pollout =3D 1, .plug =3D 1, .audit_skip =3D 1, .ioprio =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .vectored =3D 1, .async_size =3D sizeof(struct io_async_rw), .prep =3D io_prep_writev, .issue =3D io_write, }, @@ -100,11 +98,10 @@ const struct io_issue_def io_issue_defs[] =3D { .pollin =3D 1, .plug =3D 1, .audit_skip =3D 1, .ioprio =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .async_size =3D sizeof(struct io_async_rw), .prep =3D io_prep_read_fixed, .issue =3D io_read_fixed, }, [IORING_OP_WRITE_FIXED] =3D { @@ -114,11 +111,10 @@ const struct io_issue_def io_issue_defs[] =3D { .pollout =3D 1, .plug =3D 1, .audit_skip =3D 1, .ioprio =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .async_size =3D sizeof(struct io_async_rw), .prep =3D io_prep_write_fixed, .issue =3D io_write_fixed, }, [IORING_OP_POLL_ADD] =3D { @@ -248,11 +244,10 @@ const struct io_issue_def io_issue_defs[] =3D { .buffer_select =3D 1, .plug =3D 1, .audit_skip =3D 1, .ioprio =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .async_size =3D sizeof(struct io_async_rw), .prep =3D io_prep_read, .issue =3D io_read, }, [IORING_OP_WRITE] =3D { @@ -262,11 +257,10 @@ const struct io_issue_def io_issue_defs[] =3D { .pollout =3D 1, .plug =3D 1, .audit_skip =3D 1, .ioprio =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .async_size =3D sizeof(struct io_async_rw), .prep =3D io_prep_write, .issue =3D io_write, }, [IORING_OP_FADVISE] =3D { @@ -421,11 +415,10 @@ const struct io_issue_def io_issue_defs[] =3D { [IORING_OP_URING_CMD] =3D { .buffer_select =3D 1, .needs_file =3D 1, .plug =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .async_size =3D sizeof(struct io_async_cmd), .prep =3D io_uring_cmd_prep, .issue =3D io_uring_cmd, }, [IORING_OP_SEND_ZC] =3D { @@ -554,11 +547,10 @@ const struct io_issue_def io_issue_defs[] =3D { .pollin =3D 1, .plug =3D 1, .audit_skip =3D 1, .ioprio =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .vectored =3D 1, .async_size =3D sizeof(struct io_async_rw), .prep =3D io_prep_readv_fixed, .issue =3D io_read, }, @@ -569,11 +561,10 @@ const struct io_issue_def io_issue_defs[] =3D { .pollout =3D 1, .plug =3D 1, .audit_skip =3D 1, .ioprio =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .vectored =3D 1, .async_size =3D sizeof(struct io_async_rw), .prep =3D io_prep_writev_fixed, .issue =3D io_write, }, @@ -591,11 +582,10 @@ const struct io_issue_def io_issue_defs[] =3D { [IORING_OP_URING_CMD128] =3D { .buffer_select =3D 1, .needs_file =3D 1, .plug =3D 1, .iopoll =3D 1, - .iopoll_queue =3D 1, .is_128 =3D 1, .async_size =3D sizeof(struct io_async_cmd), .prep =3D io_uring_cmd_prep, .issue =3D io_uring_cmd, }, diff --git a/io_uring/opdef.h b/io_uring/opdef.h index faf3955dce8b..667f981e63b0 100644 --- a/io_uring/opdef.h +++ b/io_uring/opdef.h @@ -23,12 +23,10 @@ struct io_issue_def { unsigned pollin : 1; unsigned pollout : 1; 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 */ unsigned is_128 : 1; =20 --=20 2.45.2 From nobody Fri Apr 3 07:59:11 2026 Received: from mail-oo1-f97.google.com (mail-oo1-f97.google.com [209.85.161.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4EEF227BA4 for ; Thu, 19 Feb 2026 01:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.97 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771465427; cv=none; b=Qypi0wI5fqGcAcvHa1JOVISn+WHZixmObOHmAp6hHORYWh9sGzWVkdPq5g7LJspmP5rujX6+DM/9K3CVXcAZDFOseqAnYDQtWRKOGXPNujDaAgmK49p+qSHRY6jAkjqeN9/idZUXdFbVDc/zfYLfMyCf5UmlKH2dAiISZtBLHAI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771465427; c=relaxed/simple; bh=tV41JT4N82HtLiVT4LDve0d5RQZWyngFmDTN+LM2KSQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jj4pjT04fXLMvVjKzRE3BLYUXCzPdkxtvuS6KF3czRKjouie/LQTprGfLggXlhthrDPNMPXbSod9mkxCgrFHThd6NcI22HHAOt/bMq1Zs+C7evTkeQjUQnDyT2VF6uJRW+vW9K7bD0vCwbBWZt0t6lahvTnsT5HDnzQmO2zqKHY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=K1QMBc0t; arc=none smtp.client-ip=209.85.161.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="K1QMBc0t" Received: by mail-oo1-f97.google.com with SMTP id 006d021491bc7-678061ab66eso32478eaf.3 for ; Wed, 18 Feb 2026 17:43:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771465425; x=1772070225; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cD5qcELz1szuWzdXkgd0fgG80WegTttIPZeozvdhos4=; b=K1QMBc0tijEvOQMuBRX61IYuaNingv8UqIP75jzJdtB+oFOFSFJX9A22Wgt198UeVl Gg/EqhboLZj4eUEifY/Lg2fqZGgsaxon60yMafnoAE074OSryzJXmtXCm3YTTvItucTm Rnuz40FD2Q4SY7Ah6Y0EdadYgqjO7mzbFHyjc5baGrHRnin7kyE0/wE1zBazLNMq6VFi 60TzMK+4+q1OQt1dwNB53J1G8XKl3XaA/M5N4nYwsn0otrran7CuSSV7Sh2umOF8O1u5 Z4Dkj0h3ZXYRzQognhp7Y0kWtet0yqwjQ6WQegTL+QxD1Rtv1ESF0I39+GyTfB7RRQ8h 0O+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771465425; x=1772070225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cD5qcELz1szuWzdXkgd0fgG80WegTttIPZeozvdhos4=; b=LOgd1/SnAjjnWGTy/jOSuh1ryzK7zDZUU0Vh2xfGQGfcuwdgRHqJ7pyFfAjJUyp4J/ rHb3M3tuvQLHMhorJZ04RGfiSho5C0ZoJ2MO9C5Uancn1KCKJvMXK+o3InsCXgrDBa+o WBG+ElmTKIbsyCfcPhkJPLOZzpJyazymjR4q0uVt+I7WCb9RrqA6M6yuwaBXbrAYXCUh rYU+r2+vp3p/+6dE++NWy17fgOT4RpvQMOdxmYZnwu20PtdpmSSXVesZ2iaiSkwZL6di NPeQ61aaNcv7vhtuCi3Mqfg6KAM8+17UwnN9MmZziMqGburqiq21hxm8nZiN1Cv8ENG5 DatQ== X-Forwarded-Encrypted: i=1; AJvYcCWYmZieJMxxRAobGkSsdu/gR07WTXuLunHB80kSidKhDNCHvwAiVBzuNSFvLiivHHxUd+ZQ9LSopoqgikU=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3MFQAbWvr0Mivh4lswrNyDHsP+vqWFrHREMw3INKZ6imo0JDN 8ARnSlzfu5RiKReOyyEfTW5lOxtVsArghINNyK3H7huhM7YYCjKwY0FDKav9fTtJClq8HPGttZe PNrhPnedZeYGC+kyDSp83fQGbLZjPIAY2bHVs X-Gm-Gg: AZuq6aJSBVm/2gn3oLYkWWkPLNxJ85EN0tNRnmhSKtWFS2vDMR9XM7UHGrd2A5R1swW H86anMRzVpZ5R34hacToCTBaNtZWBdJxAPieOzXYWBkQ0K8AjNGB9zn4OAfyDkO/jpv5ab7She0 FtTWA3byVjm0jRvteVfpay5vDVZLF1He5Mw+Bgq6b2CjoYs6fratLdm0M0SjR+7YUN9fTPmZdEj TVTrWclAxrclc214yYVI1Xeq0+D3Iuq5R5unOsI6MfOvBB2jvhW4wMTigAgFfhtj/HQRrgRVbfr C3yr8rLKUSxzKitNnC9s1Kts2WJSTwCI5Ng9gy4vC/h7+ZwSHQBme2WxfmlwN1BmdNSbT9+q2sv Vqo36HvMUPBPW6b23+8LESEwhhqe5mJhsPeqfrH7T8LB06rLxxZOqYg== X-Received: by 2002:a05:6820:498f:b0:679:ae61:ed85 with SMTP id 006d021491bc7-679ae61f23dmr566445eaf.1.1771465424693; Wed, 18 Feb 2026 17:43:44 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.129]) by smtp-relay.gmail.com with ESMTPS id 006d021491bc7-67997aeee34sm737226eaf.5.2026.02.18.17.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Feb 2026 17:43:44 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.112.29.101]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id D8A4A3422C7; Wed, 18 Feb 2026 18:43:43 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id D4182E41D2F; Wed, 18 Feb 2026 18:43:43 -0700 (MST) From: Caleb Sander Mateos To: Jens Axboe , Christoph Hellwig , Keith Busch , Sagi Grimberg Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Caleb Sander Mateos Subject: [PATCH v2 3/4] io_uring/uring_cmd: allow non-iopoll cmds with IORING_SETUP_IOPOLL Date: Wed, 18 Feb 2026 18:43:34 -0700 Message-ID: <20260219014335.9061-4-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260219014335.9061-1-csander@purestorage.com> References: <20260219014335.9061-1-csander@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently, creating an io_uring with IORING_SETUP_IOPOLL requires all requests issued to it to support iopoll. This prevents, for example, using ublk zero-copy together with IORING_SETUP_IOPOLL, as ublk zero-copy buffer registrations are performed using a uring_cmd. There's no technical reason why these non-iopoll uring_cmds can't be supported. They will either complete synchronously or via an external mechanism that calls io_uring_cmd_done(), so they don't need to be polled. Allow uring_cmd requests to be issued to IORING_SETUP_IOPOLL io_urings even if their files don't implement ->uring_cmd_iopoll(). For these uring_cmd requests, skip initializing struct io_kiocb's iopoll fields, don't set REQ_F_IOPOLL, and don't set IO_URING_F_IOPOLL in issue_flags. Signed-off-by: Caleb Sander Mateos --- io_uring/uring_cmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index b651c63f6e20..7b25dcd9d05f 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -255,13 +255,11 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int i= ssue_flags) issue_flags |=3D IO_URING_F_SQE128; if (ctx->flags & (IORING_SETUP_CQE32 | IORING_SETUP_CQE_MIXED)) issue_flags |=3D IO_URING_F_CQE32; if (io_is_compat(ctx)) issue_flags |=3D IO_URING_F_COMPAT; - if (ctx->flags & IORING_SETUP_IOPOLL) { - if (!file->f_op->uring_cmd_iopoll) - return -EOPNOTSUPP; + if (ctx->flags & IORING_SETUP_IOPOLL && file->f_op->uring_cmd_iopoll) { req->flags |=3D REQ_F_IOPOLL; issue_flags |=3D IO_URING_F_IOPOLL; req->iopoll_completed =3D 0; if (ctx->flags & IORING_SETUP_HYBRID_IOPOLL) { /* make sure every req only blocks once */ --=20 2.45.2 From nobody Fri Apr 3 07:59:11 2026 Received: from mail-dl1-f97.google.com (mail-dl1-f97.google.com [74.125.82.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5160C248880 for ; Thu, 19 Feb 2026 01:43:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.97 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771465427; cv=none; b=jK5juC3us5dggbWhddlHacoXKmoJmoNqe1tLVPQ0PSUU4NXnw3s6twjqaXCQ74fcdbuSeh+sa0ffsrGcdfmM2rpInEMneaeDTJGviWxbYndMub3Hag2wltMQTsyAfRW9tV62iLPZRuX1Y/Th9vudYAmFPP8cur6qwxGJxXMBuXM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771465427; c=relaxed/simple; bh=Pk0eKb5jrGWG8Xmev1Uz7ZL4nkZ1Sxp5mFYfnx60VKA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BbOcRCQ3ZLZ3ccLZH9UZCc22xNG2caJ4IaUtGko6mONyLBtTQ9d2jJY8/hXh48HM3N03WIC/6C1Y2xjCoc+pgq6iG2lJhAPyup0imPPIPiXtI20u6da6B2qy8rQs2x83y8wBNxie4/aE91d8Ct0WMPHwzwA6gK7mxOIzrHNsGfc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=YICb4H+S; arc=none smtp.client-ip=74.125.82.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="YICb4H+S" Received: by mail-dl1-f97.google.com with SMTP id a92af1059eb24-124b07e5fe4so42534c88.3 for ; Wed, 18 Feb 2026 17:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771465425; x=1772070225; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AmRiY+gYv1Yx/1Ht580JCWnZXV60oDsI6NKnjtBd258=; b=YICb4H+SfryGpAmH7wZAcU94IZ4zlL92VTqiOZoLdG1yGzBzARypMvRp8XP7K9vSpZ Yf2PZ09G+ytr/JnEdzwaeGSn/+aJIhgpAsilNXIKTXhIq0fbyyAhmJOJwX7mUpPMaJ+3 jaE52bM2IvuvresRMc7XxS5xsrmI1jLkjosWYQU+8XopHm7iWDJuvCemgOtyQtivClSh TIp2Ggu+JYr9fOT63mUz5RLeipQA89cVXxQpJZVvxTOw5lD7JhlQjnOjAdQ5cm2szANg RM6KkR+u1gqczDRTilJGlv+eEK2S4I7OD468r6v0XClLS8ztoL5gg9ETx0yaPxqdUmsc ArDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771465425; x=1772070225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AmRiY+gYv1Yx/1Ht580JCWnZXV60oDsI6NKnjtBd258=; b=INgVZ2+bPbkTXiA2S3UVEHljrHpG2wB3ggUVM7uhik/uCUmn2A6/RAi8hkWftRlb4w jc45EhIpUB8HaHHwkoptF+sIyEeYkV5DdLu4+XH/MyDjceB7jxrQCN53CG8jAT/VODnJ Uu3KC2kJc2hC878/uHj0PHEX8AuIybC+IW/I7y3/3dXDDdOtOC15hkI1LxFmpc8NHiA4 guCFzxdYrBMxfBoARqCxBymbvc5Eltc5I8VAukn0myoE1XUdny6qmrAl20MkIyTAWLVM wx4qxN4/kNJ5N3f5P5NB33eEKDVFw6J900aR6wxZPmNDjP/EVANSYUXXhzG1o+qPvUv1 tEUw== X-Forwarded-Encrypted: i=1; AJvYcCX9TqCoQ7C8qCpaFXZiZT9ZUgQxZmT/J0vFfWjDFVzIQl60X9qAYka3MtPKhmV0hVl4EzCbiLvFfnnmNGI=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+Yh4C1DWrVONCc/OvRAOgvVNp155AJL4G0pj2V//rU4Xkd8BN skQZlBFJY+oHM/vSyYPXSOF6kpHcVDOkwttHBG/BRo8ie8oPP2hE7AJc0P+slRc/3t/D7uO+6LC 2fFjXs4ZIyjq+ZEGnGngmzb/Z5PYW2QRejIEHp8ZhSF/5mjihvU6b X-Gm-Gg: AZuq6aLlYubLDmQ1wKUfnQCozGA86hOf3sHBhvv+Vf96iQo03xU5eMxowvEu072W0fa 51dRpOZT/zD8KtAm32iLHWuY5hw9+UYUjrKrBfZ9YppWhYT3K4vfslIelYXvzATyBv5plNTKT3M nd1DxemnLhh1zoNqqQ4YGUM1WGUQEHp6r0G8T573dSXRebzSybbf9uaJ2p+FXOPgtlOmwAtTwfN REG+DQkayyIIpE/eGBXX7EvKI/J4Ppa3vAyhKHjoTIni3gid+E14u7oxFXSf3Ljb1UGVMWoH2Ac 4Zg42vT8L8bxbmdNvc3BjJYgbpwKwfjoHBM1y605WeLjGzvRjdt/2GwDMo5N1oj4ii2BvenuM4N 9Eq9VT/DL4PzosSn8H1JjAYeEafx0AhZm440Cl0o= X-Received: by 2002:a05:7300:3b04:b0:2ba:673b:e328 with SMTP id 5a478bee46e88-2baba13781amr4428856eec.9.1771465425201; Wed, 18 Feb 2026 17:43:45 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([2620:125:9017:12:36:3:5:0]) by smtp-relay.gmail.com with ESMTPS id 5a478bee46e88-2bacb64f67esm1955371eec.11.2026.02.18.17.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Feb 2026 17:43:45 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.112.29.101]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id 4019C3422C8; Wed, 18 Feb 2026 18:43:44 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id 3B4D1E41D2F; Wed, 18 Feb 2026 18:43:44 -0700 (MST) From: Caleb Sander Mateos To: Jens Axboe , Christoph Hellwig , Keith Busch , Sagi Grimberg Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Caleb Sander Mateos Subject: [PATCH v2 4/4] nvme: remove nvme_dev_uring_cmd() IO_URING_F_IOPOLL check Date: Wed, 18 Feb 2026 18:43:35 -0700 Message-ID: <20260219014335.9061-5-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260219014335.9061-1-csander@purestorage.com> References: <20260219014335.9061-1-csander@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" nvme_dev_uring_cmd() is part of struct file_operations nvme_dev_fops, which doesn't implement ->uring_cmd_iopoll(). So it won't be called with issue_flags that include IO_URING_F_IOPOLL. Drop the unnecessary IO_URING_F_IOPOLL check in nvme_dev_uring_cmd(). Signed-off-by: Caleb Sander Mateos --- drivers/nvme/host/ioctl.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c index fb62633ccbb0..fa489c1979db 100644 --- a/drivers/nvme/host/ioctl.c +++ b/drivers/nvme/host/ioctl.c @@ -783,14 +783,10 @@ int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *i= oucmd, int nvme_dev_uring_cmd(struct io_uring_cmd *ioucmd, unsigned int issue_fla= gs) { struct nvme_ctrl *ctrl =3D ioucmd->file->private_data; int ret; =20 - /* IOPOLL not supported yet */ - if (issue_flags & IO_URING_F_IOPOLL) - return -EOPNOTSUPP; - ret =3D nvme_uring_cmd_checks(issue_flags); if (ret) return ret; =20 switch (ioucmd->cmd_op) { --=20 2.45.2