From nobody Thu Apr 2 22:04:03 2026 Received: from mail-pf1-f228.google.com (mail-pf1-f228.google.com [209.85.210.228]) (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 72946425CD2 for ; Mon, 2 Mar 2026 17:29:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772472564; cv=none; b=C8xn5cNStr5EuVL//KSro0onVyrBE6GJlCoPdlhkpfncBmFwQKeJuLkZ+04Inm7zwPP5sFp3yU36IiV+6m20dGADsi+fTeiCua6ynG8qgu03cyaRLD6YDzwcXFEMoB8UoZJ/ZOOKBSNUDu8uaqh5wE4M8DmP9iE6z1/p8eRyU1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772472564; c=relaxed/simple; bh=mZRg9aJ/vT9KGxR37N9gh9XV0GFWpQmAWSI7PzYmIhE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vc+itFpg+hUJRioJT5lPV9cqhbrhUL2jEa9vMB82l0JM0G2577+x50inp2z0z3w0PPcP3732PIKZUPqDDGHoAHJggraw/4kRTIUixMAZUFB+HB1OOKLh5yBg/SASXMYSVtyYHleHPksDdTNgAT9O1GwymTYtxTWjxo8M8iTwkMg= 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=N/6xq2qk; arc=none smtp.client-ip=209.85.210.228 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="N/6xq2qk" Received: by mail-pf1-f228.google.com with SMTP id d2e1a72fcca58-824acdfb73dso260781b3a.2 for ; Mon, 02 Mar 2026 09:29:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1772472563; x=1773077363; 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=qVH9fXQsVA7juGOEz+1dE42o2vyEutyAkezbvq+KUlE=; b=N/6xq2qkrtExtQSZN0gFAwb2sYl8vKAs/zM+B6ok/seGbGtB2OCmNemofhZztUXpJt sIEAUjmYxscGST04cpu18EAdgsfj5Y2VKfle4ujB4GsvadmTpcBNyKD7BQz9cq1quAoX PmAhO99AnamEypVz3tGSVogl3g6RgDZHz3SdDOkixMBy++Ut/Ls0xXEdq9Ul9GWcV83/ rAQ0+bhi1fIhQIc9CSDAuAPWMKPxFoDMvg6yce3BUM7lNKDJe3EmTr5dl0AlReIeScOv oU1vKpJTtRyG4jmD8lMXDLIfPExVl6sPb0lEe0tRkbNroMA0ixULNi86s8FkpUalHJfH v9ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772472563; x=1773077363; 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=qVH9fXQsVA7juGOEz+1dE42o2vyEutyAkezbvq+KUlE=; b=EMosUDDIoXHZKSDM2fFC0CVU17hsD0gJYbfp+UKPi81CU7f0m8r3pJU9ovdNFNsmmq i2kyhi/E8259ksrGSxuyQruYrES9WEI+Mbvn/mMhf4h45+8bZ6NwCVAhXfi6QGOFvXLw gi72dsa4XBm6URX+mzNmIGCrN6TL1+3zN4Ox9ZITGQlEtjxQMA57ZNxNEZ3KfoxSyYyV v4BhQ1yRznZqMlMxrVqn0Kiv1HFgsKS2ZAvmCevYgncdG7o4eAMNEkeOXTP8TjvBT+uh E4Cq+sXfNvz/9iBSVRGdP6WUWizQtezpcqWI5GN1CRGiaAvKriQuBZsZFwNsZmewnO+A +AfQ== X-Forwarded-Encrypted: i=1; AJvYcCXx/rn2g4XPOC9q9O+KSeQfqDhM8aYBpxMJvB0WyLquphQfC3PaFOCfNnh7rqAlu7jrjXJ30PtYrGP99C0=@vger.kernel.org X-Gm-Message-State: AOJu0YwqQXoHbqIDHJX3XXyEPdYrJ37FYB3KikwbWiDU8ngsFlgGi1JS fQHi/bEmml69YoqaK8dLvCHC130KPmVeAfjuyr8MB59QLrrD1QCMkdFPlmlq5TvUQVtMCW87OAB 7+/X7KnofUiCwAfwhEJ2IPLlW2UTvCNmXaGPE X-Gm-Gg: ATEYQzwuCO9XFdh3Wg3YwxXrNWMt7k0JEZZ0dTkEwPALGkvtayTfC82Kr2LM7rXTzWN v6syjDRI/kU4N0/AQZ9XwHQkSMXZNJSF+B6ANUU/sPPiFaOieCdqw1vIyZeV7AF8OWzn+utJ7+B FKJ6qmJsGpQdAYbI6OtkZJlr35uySy5JgW2ajrhcQ4Ee52yX1CJUmMYRNW/7HRjYx/SF913eT+c xOPLJE0lhsjFSfj8HGPgUEQDFXcdOWQhh0OaBpCykwe9E6tf3H90A3b8rwK26vUaZlX3MiMVM5t bVVmkHpEeCnWXMNl+BXVfcM7RxVQUJhF638XPG0mlf4I73eyXDjPflQfMLwpIcFhhDHPhLyfuEh fR21yMiOx6BdItzIMFK/vRQn1gdWbTbgiOvxfW0cRre2EDEf/7Ja4Og== X-Received: by 2002:a17:902:ec84:b0:2ad:c1fa:ceee with SMTP id d9443c01a7336-2ae2e4fe432mr94384075ad.7.1772472562651; Mon, 02 Mar 2026 09:29:22 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.129]) by smtp-relay.gmail.com with ESMTPS id d9443c01a7336-2adfb16ae40sm16178815ad.13.2026.03.02.09.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2026 09:29:22 -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 C2CED3404C4; Mon, 2 Mar 2026 10:29:21 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id BED93E41FBD; Mon, 2 Mar 2026 10:29:21 -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 , Ming Lei , Caleb Sander Mateos Subject: [PATCH v5 2/5] io_uring: remove iopoll_queue from struct io_issue_def Date: Mon, 2 Mar 2026 10:29:11 -0700 Message-ID: <20260302172914.2488599-3-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260302172914.2488599-1-csander@purestorage.com> References: <20260302172914.2488599-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: Kanchan Joshi Reviewed-by: Anuj Gupta --- 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 e7f392e962bd..46f39831d27c 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 645980fa4651..c3ef52b70811 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