From nobody Sun Apr 5 13:12:18 2026 Received: from mail-qv1-f97.google.com (mail-qv1-f97.google.com [209.85.219.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 A2E1534D922 for ; Thu, 19 Feb 2026 17:23:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.97 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521788; cv=none; b=bmS0WMixZ1njht8Dl8PMBkVZio8TdOw9VJ3gZgOnTL/za/w+AvF5Rspd/nIB588QhwpGsMShbg19vAx7SnknaEq5F3V4sEJMqSIc6Q3e6zFKgX4DBnKZuwFVPB2GrFAaY9XS/vk9UepIC3diHvFRNnuKYUh8ovc4lDpSKYijoS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521788; c=relaxed/simple; bh=b2plIQMDCjpErORTlUkJYgO8/T5ZJZ547eb0xAFDohU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cCUlrK2l5kyuXzZGyHsi7c2hxSOON613BDuvr9knTnkkG94QQEuJ1X+4o0P6fT7FfOuEyxrryNlkCB97bbvq//vQYzbYJmoNnyYFp2W40wRP6S8ZfzSjexqWZfWIyVPdFG0fgIrjNLOOxqUvl6ZWzJmCq8+Qi6jZ+nukr1VdMCU= 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=VV/e35D4; arc=none smtp.client-ip=209.85.219.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="VV/e35D4" Received: by mail-qv1-f97.google.com with SMTP id 6a1803df08f44-896d82bc48bso1100916d6.2 for ; Thu, 19 Feb 2026 09:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771521785; x=1772126585; 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=8C1D3sUvdBYYZCkJc+065BogBWdk8oAZ6MrxwjeZhTM=; b=VV/e35D4U5D6pUMMq72RjtK1lmJzJfcYYpDZdiSVAuF6AR5hBuNodrDARjCNT/6Y9+ akpu4GIHTbPRe7ZQXCtqu3f1cbr4Tw087ILhIfHq2iySr9gwlyswK+u6DfDUMMUesZ4X GE2LoO+MYFmrmtD5rkXZ/xHFeYpM8ehRCckNlvtJAmHHzf+c4zBhxHvEAikIirZP7A/+ QoRInYLFJtnt/F7YPkittpxUHYsNexIuzu9MKO5Q4wWgWYeDUD0IJJcsuIkZCHKYesiE Fp9cF2SfvX7Zkpv7abs60hfz9VcAO9txx7fvqBj4SuZ9nASJFCBk4L1hHSHUE/Ecvbdh dYkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771521785; x=1772126585; 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=8C1D3sUvdBYYZCkJc+065BogBWdk8oAZ6MrxwjeZhTM=; b=glQQaFmPMKgTNPHxCX5fcp0R2K/PCRMjygyxFu1JQNAdDe9FEV6UPE2SB89C8wpkXM 5DA6356dcdhgunoBWkkRa5Ytssc0oBSAO+RIbUHTS3JTUuBgYg+y5VrViglJkuuNhtOJ LpFnZTycubuuIlT7z0tHHowTx2otKeytK1zgsx0leeX9VeFraYR2jlivkBuBfwmF0guv nVRorbNz0hZqOG6QaPsfHSrJMQvKUv/PbHK3QTqS1STY4Wr/4SIWN9nad0hiu66uAed3 22M2GuAIVx9K9ky52jprQRbBtu2p+A3FB0nig+gIjgD+5p+g2XITv31SPH2XuwZLn4FW s2xQ== X-Forwarded-Encrypted: i=1; AJvYcCVRjAzrrkfjydCJx5eIy47XA+IwxqiyUkxDMWCAHSy8uAqckhkcT5EQzEMS6XIgjogoUWCzyBOia4bUlpE=@vger.kernel.org X-Gm-Message-State: AOJu0YzNhhA30sRjEfzeKcrzB2gXKXOy7lgCacDyTg5rt8RQGAJltUxC 6sXVs0V7Y9phkdudJ0gbsCGw0lkvR8vz0jdg8lprS171TMpf2UcwbXHJaRl74DY9x6R0nJJo/FQ FQuXdta4U6I0JaRSgLDPmSZoZjucG1SEkufOaHbx7t8DANmYpQWqS X-Gm-Gg: AZuq6aLK1CB6amGMHNZrJyU9VsXcSp4Nlf9gASJxQv9AFzdO62nK763IJxUyxakRJB/ qo3KVR4Jwd0x8PaJZbkh0zL35hMaix/5Xu8SlezludE2Zq4XN3HHHpc2fUxi/oDLFkhQPSd5Cy0 ya778Sa0/qxC4SLPjuWskksZO8PWddxIvXAE2S2q0ZamBNlelO0wKJdbEowNlgLP9F2AAH24wzN q/l2J4+57+QBX+XYwiGd5Xvc/ZiFpTKNHNJ35no8JaDbuAsni4Cqc9AAZL0TevKZiA+UfLE2EDk 2/eBLZR5qlhHsOo+CPjjGhOVwP2H+Lg4GPQcV5DJTlvykIWzOJpD/p8cjfFu1wmAe+ZaAacilXl VFvMmsW5mH8K1aNpNbtyYiEN8isLVMYuooWM/Y8k= X-Received: by 2002:a0c:e002:0:b0:895:3b2c:7708 with SMTP id 6a1803df08f44-897346241b8mr220248196d6.0.1771521785373; Thu, 19 Feb 2026 09:23:05 -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-8971cd75df8sm31539626d6.30.2026.02.19.09.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 09:23:05 -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 B2C07341F2A; Thu, 19 Feb 2026 10:23:04 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id AC84CE41AE3; Thu, 19 Feb 2026 10:23:04 -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, Anuj gupta , Kanchan Joshi , Caleb Sander Mateos Subject: [PATCH v3 1/4] io_uring: add REQ_F_IOPOLL Date: Thu, 19 Feb 2026 10:22:24 -0700 Message-ID: <20260219172228.429479-2-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260219172228.429479-1-csander@purestorage.com> References: <20260219172228.429479-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 Reviewed-by: Anuj Gupta Reviewed-by: Kanchan Joshi --- 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..d74b2a8c7305 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, + REQ_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(REQ_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 Sun Apr 5 13:12:18 2026 Received: from mail-pf1-f227.google.com (mail-pf1-f227.google.com [209.85.210.227]) (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 8E12541C62 for ; Thu, 19 Feb 2026 17:23:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.227 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521787; cv=none; b=G5MXhh12CBsRPcG4+iGEfN6N8kDWxcnOTsxxx5xs+lwmDneKXJ9aogO65bD9CMap6i1KYiejifKS3HsmCoe9UQXt4TirM3djd0MH3H/ghuYdV7IpmtANIpc8QusXSNCYjTwjZ7RKr9nyivXnaAmFbAAezhM+88oqk0fkzrz2T1c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521787; c=relaxed/simple; bh=EHWMm11e5TVx8NT/hLERqyUnuuxjz5z5bCiInE9uL2M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j6R02XOmT3acBuRTJq1lLAc8s31ZRniy7UEihBAZKxvW/bNUwX3xKXxrFnmbTVINUQQ4B15PpKcJX2v3dWCUmY3bwDVlOI+Lxzy2dzyEDjxgNuGcYDUeRqPDH2dShbjdESREG0F6nyoms2MyWau7rgkhsD+rraGarjBFOCv7/VU= 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=OYO+ntTS; arc=none smtp.client-ip=209.85.210.227 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="OYO+ntTS" Received: by mail-pf1-f227.google.com with SMTP id d2e1a72fcca58-824a16c1d2aso91221b3a.2 for ; Thu, 19 Feb 2026 09:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771521786; x=1772126586; 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=OYO+ntTSm29oRNhf2zM2LaZJSmhofr4nthTgO/zxqyVxVW6lvpRdjcSjED/8EOOb1x GVmGqyjpap6RswRRWcJOWjnMF1qBnbm1lrmX5P3MNsOWnzQu57rxa1tLej1Y+kdvYvST CCG5/E0+6vFUUh4CkKh4wJzjZxAD1c/z8FvthxyIo0+Q7XJKmWwShK4yTCvb+HiBVicN YTrJL5Gt3RVPnjUfJjasA7QsD8+qTyMuSqXC1QfUqp6Y8vJ0atNAhzr5TaVYrPek75NS vrSMCHNdAhQ60qy+zxgO5lqJvCyjn2th7AXEP/jBrTuswzM6Kq/QPOZxmDau1pPhfpMZ Kclg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771521786; x=1772126586; 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=W3zKATn6yt5V4KmMcLrjEmy6u5HTe0hRV1ENjRnO36fiiSNuHZtmFVoMdDdidz30AL WN8Fj7vP/w5OfFPSwWeNCYGTHoR0oQS+jd6kfF3NoCDvfG175ePxb/WWnXuLg1yCMzx8 t0hU2zzcEs8dDEgNDkqiQaaK8oIFIzdHNmM+QH1ndThHXFZHUunejPDytKoMyQc1OrOH ESpmRlliWCzC25OqWbtWHIS/NaU5782wqShKknryXjsZ44aytnSkTQGJFI6GiqD90OEu nDdGI5PmgbX/a01mHm4a3doUq1Wyqp8NDW+z2iL4YPEQoGQpONYOiQTsWKiW0YSfqT/f LbWg== X-Forwarded-Encrypted: i=1; AJvYcCWPJubNekLYQ+oNxLMAJvOzjFhPav7Pp6RPYtu5yBa7+XT/f9W/4YXE/dUutEEu509LetDWCHTr7bCpC1M=@vger.kernel.org X-Gm-Message-State: AOJu0YxWVTrRVMxiQfL+34BJEGhXLQ7xB+OtCtUUBBBhBwneiyuIDSqQ mLsI8o6T2uFxrGmy5OoLvojukRPNTKlD4qjEz56FZFei3UdeFDd94Jj8usVN3ZztO3pLIzzRNwZ /x8uMnTR9sdY2rboIc+8x7Zm2xK5+Wn8OR0leK5fqfCqDqja02+Od X-Gm-Gg: AZuq6aIA+RbiCuKNPmGa4NhcTMFFeZI+FY6qxVPjQmf2p6IC+++0KpNEhyoZr7Kr7Vy yPGHlBhVCwE9fo9CwBBgNJwv6taAm3Y9J5MMv2rRl5B7Cy+B7hTMX/oSqxg6CBKxeMQIEZo6HmC 9m4dtf6S3okWGmZFs3n8ENTWlwecOJ1D2D1WRpW0NKPz1SFM1Q1+wzT1uJRNhS1JXUAkl6K4XVy NJnVo0Y2f30z5jOaDcHosRHc8Zhuw4YK/lPy7fiV+LzIK0DO5747c6xpMybeXig0fGeWAC8RXh3 K+kZdqQ08HEpPR74vBFR9opd073edQfl0Z/ck8mvlzIg8e56ClG6jdNNtYsPoROohy2mF/u/ti+ 88bHhoPCtyXml7kRFGIYUjM4KFI3RQbmbnuY1xs0= X-Received: by 2002:a17:90b:2cc5:b0:356:1f2b:7e9b with SMTP id 98e67ed59e1d1-356a6e38413mr14529793a91.0.1771521785723; Thu, 19 Feb 2026 09:23:05 -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 98e67ed59e1d1-3589d81739csm95093a91.4.2026.02.19.09.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 09:23:05 -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 EA2563420F0; Thu, 19 Feb 2026 10:23:04 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id E3B5AE41AE3; Thu, 19 Feb 2026 10:23:04 -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, Anuj gupta , Kanchan Joshi , Caleb Sander Mateos Subject: [PATCH v3 2/4] io_uring: remove iopoll_queue from struct io_issue_def Date: Thu, 19 Feb 2026 10:22:25 -0700 Message-ID: <20260219172228.429479-3-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260219172228.429479-1-csander@purestorage.com> References: <20260219172228.429479-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 Reviewed-by: Anuj Gupta Reviewed-by: Kanchan Joshi --- 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 Sun Apr 5 13:12:18 2026 Received: from mail-pl1-f226.google.com (mail-pl1-f226.google.com [209.85.214.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 942E234B194 for ; Thu, 19 Feb 2026 17:23:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.226 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521787; cv=none; b=BywXSEQHprso0tgI3KGtlXPziEsnSbkJXjsQJuhAcCSGNwuhlwhQnO3460fckWUfAh3sgouq5gdaEdJZanRuqHgkVYUdvakZrc/07F7gVAoxN5wvvfrsB2a5mHWMQEAifqXo0jCj6Oc5Evc8eIQLNVl4wCh6PPi4wFRAv99MseY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521787; c=relaxed/simple; bh=tV41JT4N82HtLiVT4LDve0d5RQZWyngFmDTN+LM2KSQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S8JaPDp4WBk4HJeEFerzz4RnxnvhJGriO+OaP4OTNBSUHuYHeaXHoruJQC5WgWs01u07tl9dwDWJ/o8EcDk/KHMK6+C2fwnJnmAY5f9nCxwQvSd9nV3WE8/IfgSA4JsSj4fnRaXYv/fvreWM8r3sgcM8RJX+LOEKyIdypo9nPxg= 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=JAB4HSGa; arc=none smtp.client-ip=209.85.214.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="JAB4HSGa" Received: by mail-pl1-f226.google.com with SMTP id d9443c01a7336-2a8fbd09b09so561675ad.2 for ; Thu, 19 Feb 2026 09:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771521786; x=1772126586; 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=JAB4HSGaBijit6dpJZg285XUG7gn1q7WgnAOzFzjKDjnF5luVR1E4AirCW95LaNj1H VhCUPbJEUIlIJxgqGPozbUSd5LCjEsZzsWOrjIdGAHhmdC3DH9RrwDKeYmt81K8nuzkI BClqIOUnmUItP7xaeXvUm2pxjGgh+VwAjOHxDxt0XCWdRyMrcS5eH6ZKxgGdA1NWwj81 X/j6g5SCMyKulSUi5bAKHeBma/U4bsHc7NnAXsJYHJDY1QMglCM/Q8DrhWx6X5+5q+Bq eQOuFXnH6/hmvnoVQN6JbPKC4VbH0rUOZ8YSzW9+zlhgKAZePw2z336031oWMTMSCb4f d6Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771521786; x=1772126586; 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=tBrfOLgug0aMb86oBLtka5ir8kHgm1PtpzZTXoiF42RGSZ6F/N8gK7Q8uD1aN9DqFk vS4ibSkcbYpozfj9MGvDQrrVERmblssVPhiMYLyfRyrGhEsFVICMULiOBLFpW670AbiK ecEfQcNnrQaUxZqdeFX+9+L5/Py/AzyhmHyDL2VWMwU2Ko4JYK6fLQhkMyzA2qJboSNK NHZEjh2meo5o3ZDwESNHvNQzvDcZ61EthWazQtJJkzleOQl81FC0/TcfF3uwBj87xfbU LazTnLfE3DX56AxCWVXZLnPlAEVShpQcDmB/hFX8OSkNNxNDpyr3B98ZpZcMIJNrkgTS JEZg== X-Forwarded-Encrypted: i=1; AJvYcCXjrDvdOgu2aaTm5RrHZSwUeiBw4GYv6G0qRj+mx/oDXHpyxl0yNI+krlI/xeT2PyYKoSpzWkcxO/w8b/Q=@vger.kernel.org X-Gm-Message-State: AOJu0YytRIHzqb35oO69HVkI8J5Xk9sKjgywvaZTQVn/9usxrVNMg6r0 W8fBgDtM2xa054CniUAmD657CMPL68/AuRDgld+r+JLCoAgxiCH/J65EP7Y+W4Z/YsvBygZZiSn JQqzlruhjL132Uw4uoiKOBUeqrg0y2vX6CaMv5n6IlBOw6cePh/VP X-Gm-Gg: AZuq6aK+MG12PFIOWF4BvF3WbhEo/MadnfCIGa6QwbQ8REW25sr+w55OxAKxk66IrPk 7R+lKE39IQ4ZZAcF9Zmk/K5KUPWnYJ4/FKE5Z88kJVoxNzWXzvwXtb2jh5QpV/XHtP1zi7DjqDd NmREgTINHw89BAyPd9LsI4pDt4t/ih7PodVdIkdxdv89RcAxmWMVP+twh10FLHOxB2DRo8zDojb FOQsVbsM0RqX6Ygyjjvmr7ZWB6oBZqANpg2upJ4//PkSCNn5BE0MENwjMcFVmfl6J11+2xJi6gM lPVzzNzNzzMVVgQtIEVy2DuZwexzAEloYhv7k7zozVL5N8a9iLUL5ukigseJFPZIBXk2E9cyigT GzQjgo5WJ3lD4mUxCBLqPzhFlmLDGMPYQ3T03wx4= X-Received: by 2002:a17:903:1b63:b0:2a7:8bf3:5674 with SMTP id d9443c01a7336-2ab4cb003e4mr163336915ad.0.1771521785949; Thu, 19 Feb 2026 09:23:05 -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 d9443c01a7336-2ad1a78f7c0sm21662705ad.28.2026.02.19.09.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 09:23:05 -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 2F5A4342181; Thu, 19 Feb 2026 10:23:05 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id 27164E41AE3; Thu, 19 Feb 2026 10:23:05 -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, Anuj gupta , Kanchan Joshi , Caleb Sander Mateos Subject: [PATCH v3 3/4] io_uring/uring_cmd: allow non-iopoll cmds with IORING_SETUP_IOPOLL Date: Thu, 19 Feb 2026 10:22:26 -0700 Message-ID: <20260219172228.429479-4-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260219172228.429479-1-csander@purestorage.com> References: <20260219172228.429479-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 Reviewed-by: Anuj Gupta Reviewed-by: Kanchan Joshi --- 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 Sun Apr 5 13:12:18 2026 Received: from mail-oa1-f98.google.com (mail-oa1-f98.google.com [209.85.160.98]) (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 1A7CE34DB44 for ; Thu, 19 Feb 2026 17:23:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.98 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521788; cv=none; b=cvwmBljY2kwY6v3DH+iOpu+k7zJvkNz3KNNeyNd2/dqf2G+2+ba6GKe80Z0oV0d+sy0nOByy9XDRr+sEFjv6BhFOw+YyqLKKYmzkSPI6GjJa+/XETsHngFNfwstfgrjFA4490CDV6M2HytHBtdZvBqT4YLX2TXbgGXyUAjz9nC8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521788; c=relaxed/simple; bh=Bhj4aiASHpjApLPV5AkP0Nhd4Rfthu3VwAg+PhlnxMQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jBOCLLYC3Ye0OJJW6NqGnnpxOzx9663Tcak82kGxzuKt72oduABoaonpm/IzUev6pqdyaxsv5YXbqGv1rsrLrHP2t/L0I2WxL3T4bQvrsXIn3VIHwujUcVK4oAqWLT/C/NmSiRNA51/u0j4eByL/5xNnkkgJjrBur4WApGW1Fk8= 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=JhqBpFnk; arc=none smtp.client-ip=209.85.160.98 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="JhqBpFnk" Received: by mail-oa1-f98.google.com with SMTP id 586e51a60fabf-40947c81b31so53560fac.1 for ; Thu, 19 Feb 2026 09:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771521786; x=1772126586; 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=obCm5pzMRQ/8I1Vfr0khOkZYqQ5KtFU6UC00Ngu3CF8=; b=JhqBpFnktg0dwmw9rjeNR/DO8jQvMaAQu/2WrYsOYDY4BjtIWMZL2L6kP6IaQ/9XlK qKv7aOqaTbh8dENF3QQ64OSsROiUsmxtUgA2coPLNR8iHqvPvKetMlQYl8sesrD0vWBB 6XaoUpVzoOSCUM5c1KjyASGIfV5Vncp2Ub0HhcucGhLNWMNdc1ERdbpI/Vlu2ABfyLGf WUXrvl5pVDQDzqIQjWD2libgj3yOY/uXtBb+DtvL3tT1X9mTPLXZkLbWBsoCPo/UmG58 zcociB2q0LpGRXg3sRb03FBiKLmgQhq9qSu02XJM601wXxYnl6+aZe8HZgWJWu3T50w0 DagQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771521786; x=1772126586; 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=obCm5pzMRQ/8I1Vfr0khOkZYqQ5KtFU6UC00Ngu3CF8=; b=ALC/WW9xIvXpQUQzRV2Xt4cbQD1pzYKc7JcIgWprOk7DXP5kCy1JYmz9aAPb0qrNiH 0q+1pEkoAI4fD+dVUYNvGcG9FCkA9VHVfMFRPn2ppH54acKu07ILbh/PFxo1kiHyLh1z QzdMsqiy9dWrcmzlRzrsA/jQBN3sFx888eBmRUPgsmUILiG/81GWileczE4szARGaMuk zrJB8fHeykvzI9M5XiYBSpfpur9se99MsRSwdPvm8uZJp6tvSjukkrDfu+bTmybQhEGw vaHKWIVtWFHJJraKK1U0pUpjBcAK6t40oyKt+NUZq85kb10I08/csnRTAdI+009WHZXN BGOw== X-Forwarded-Encrypted: i=1; AJvYcCWis5VC3JmXDftr7W0s5dZjf5tphpmQ4Annd1NKyIZu2nEctFKcfw7qlPlQrJs7Id1OKI+DbkbrkpRFGZs=@vger.kernel.org X-Gm-Message-State: AOJu0YyVtCHd7Sp2fHWNT3qWWuNnG6KWfbuK1vLL2gFXtcD8hzmXOIP0 mB8XshB6YJnhsbdlfnaZDp8tD/bS7N7/BwSowSyZvbhAC0m0HbPC0pEmhec87qyU/kyRtY4dbT4 iUnrilQ3sXvOHJFvMsVYBlFY8zgfMJPEYYQIEqGydV0FNebdtBzAv X-Gm-Gg: AZuq6aLZB+YLcDrbcRaoOOoHf2ZWeKMnAXjzxq5l/qtwiAxGoTcmD4NJYbmI4xBEbYt vNoKWK7b6jVYk7At1tlp4tUzrN0FT2UlfiUynD20OSqe/Jt38bwlLAU/UgEjxBoFT+i25uCFglp zie0h5mQaBwTRM8dkp54eR9kao67VD/+umMSJR6c6klt2R0Ny73+W2j9aYKrSEIwWoRa5BedBff +GlCJw7lV6r9COnVIsVbvON5WHFu9M5SPn3YtaPSKIYEByt9FiHjznkVl8C8NhZpc1QrA+PWcd8 w1gchJbARRi89wbpkMr5Es/rALNQr0bULA66sASU8DBrIAOONaftcT1rNR5eiTWrhlc1xqM/ZZn 4FK9OCJ+9WGSvJIiCMuenkXrzlnH0giwGoO17wb4= X-Received: by 2002:a05:6871:7387:b0:40e:a686:aab with SMTP id 586e51a60fabf-40eeec921cemr9445158fac.8.1771521785894; Thu, 19 Feb 2026 09:23:05 -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 586e51a60fabf-40eaf0f0a97sm4297650fac.13.2026.02.19.09.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 09:23:05 -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 63475342224; Thu, 19 Feb 2026 10:23:05 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id 5D2C1E41AE3; Thu, 19 Feb 2026 10:23:05 -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, Anuj gupta , Kanchan Joshi , Caleb Sander Mateos Subject: [PATCH v3 4/4] nvme: remove nvme_dev_uring_cmd() IO_URING_F_IOPOLL check Date: Thu, 19 Feb 2026 10:22:27 -0700 Message-ID: <20260219172228.429479-5-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260219172228.429479-1-csander@purestorage.com> References: <20260219172228.429479-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 Reviewed-by: Anuj Gupta Reviewed-by: Kanchan Joshi --- 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 8844bbd39515..9597a87cf05d 100644 --- a/drivers/nvme/host/ioctl.c +++ b/drivers/nvme/host/ioctl.c @@ -784,14 +784,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