From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f225.google.com (mail-qt1-f225.google.com [209.85.160.225]) (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 A0BBD34D90F for ; Thu, 19 Feb 2026 17:23:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.225 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521787; cv=none; b=C4vn6CiA0ktEP5ArNuGoMEr7BdTS2VQIUKwJfenn4Z7hffmvOHmmBZWLZRS7LZN4aPbAFPcPBrcpDRbFs5DRb2eJ1SdFGd6egMbcu2XuVvqPsoR3jw8tP8P8+wrMCdaobGXWNnQTyi0ozBxJqghLxafeWCL7F5psUoPLnvikg5g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771521787; c=relaxed/simple; bh=rCfwpGZ1zY1oR+FJDyVECm7GFtKYQS+W42K+Nc+4P/M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pbc/ikTryJ9VPNwqMtpFmFSY1kMfrb3eJeZJ3uNv7gjr99ZYcIqmiJ/GPjcKd3/krW+zW0HJ7yu6behHVCEY4NMzItwNbIhHHubQ6UPkifu/kwdDBDgp6WKme+YqQXTKidg1ksxOysavgmAtiYSYwbye0GuN53fOWnIm2VRuP1o= 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=cHu4L21s; arc=none smtp.client-ip=209.85.160.225 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="cHu4L21s" Received: by mail-qt1-f225.google.com with SMTP id d75a77b69052e-5032ee7bf6fso1708121cf.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=1771521785; x=1772126585; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DQ0IUqmOj4ktterC5Me/w/j1jMtCqZq/q6fvEBLAaBM=; b=cHu4L21sm1lQzHZOjVHTAjZfrS5QPtpBMoVq1DAhJpvD0C+xTVc+RkobT/+1s/sOf2 B8k2iSwn6yzWEKOoywHHMipOlha0zu0u2Ml60Bw9JrMUod6OTD769MxxDocmyIJWg0j5 xrZ/p7ZGDiFqrGyzfWavBTJ4xe60f8Fp9GnMrwyGbaFxIblmaMHDBo1GhZX7frwNobVR sPCmN5T8WPSGp7xfxTJEUuuRoYIRwo6dRVvbZmZumIQ278twRo2t8V1Vs6BR+ZcPsu7K RTg3ofoZmuU/DAwN57em/1/i+5kqwYvTynM+nA7c60cHEnOxNOWbjMccOO5bJHzP66Pg O/Rg== 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:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DQ0IUqmOj4ktterC5Me/w/j1jMtCqZq/q6fvEBLAaBM=; b=r3j1ZiXvvZjSH5G0oUXUJGnTl3pZHivwywjmSc1Dsa//H6QTgDgJ5Nlz6dGyxkee9c NJKWWYmurnvvpP5vRZRft2t5ArpVRuNyJ8ARXQ7cj2yZClICOEBLLZyaNVGjPre7RKsY CeTlngeKvrthq5GgjMVYH+oq5Yq7up/QeY0CohUAfLnUALVGFFfwi2/hL2WEPDq8X9cs mD3R9rMN/4kIa7PVBwa0MCrcX505bjTwNbM4RDpdKxjkMudQQXeTIrsmAe6AGGtoqfKX DpLynzfnweGH0QI5IR3OTLmpt1h0qRceg2d21dkWN0LeF8TBQjcbkHPvwdhnITuqZ3Nk V2gA== X-Forwarded-Encrypted: i=1; AJvYcCWFuO6ZeWAkctqomVUv7w1Je9WNWhn8JjB3tiQWJy1C0F5PAk1iOM1uWMrltZVTG4tqFx10nbzhEA9Dgwk=@vger.kernel.org X-Gm-Message-State: AOJu0YyatFaHpqWpHY8zm5/M9DPGUJ88IPt94YjqbNethTMsxxDgD4Op KZKGFLr0AogjaGvyGWPui3crvTiUYNvep8ioS9QK61/6uIdQbgAmwjUcGc20t4Nc2swuhr1InrZ CRlicpxMvGTnG+1OrV/Y/fj83eggWjUxm7akw X-Gm-Gg: AZuq6aLC2eqK1bmas6INbSbwfgxvY+TyCxWZTSS1qwHgcFj18ZujSrrEzU43uC8OS1g SXFHuigYFC1DUCZLGKfgIPQGEHxhf03/c0vfO1EuFKWVes07r7aden2Q07lnVoRrMIAYAdAl0UG MrLWOEgUGvRNVqkkCBzwyLpeIPW6Bb0LimnBiIxiooZ9ai9FevzGfkfUsMTdTLBgIYCCgC8bPJH qBT9pDCShtPLEwlf60YJ0f8Uz74Cj6hYGTWstBNQ/onCkmrWrNz+YDsEwyj4WaMDkYS6kVvYPyb WO4+AqQQUxpSDdFs4bhS6wiGZ6rlX/xkdL/X3pjWJs/O0dT8+IRz4QlVAvkbZcUpiVhvUIXr8mk a3nXZ59l3k/PkmZraeDmOi/AxK1o8BG/t7+IhNVSDSDD3D/9kal5ujg== X-Received: by 2002:ac8:5ccb:0:b0:506:bb3d:384c with SMTP id d75a77b69052e-506bb3d4c96mr198048761cf.10.1771521785284; Thu, 19 Feb 2026 09:23:05 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.129]) by smtp-relay.gmail.com with ESMTPS id 6a1803df08f44-8971cd571a2sm31063356d6.20.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 995183400C7; Thu, 19 Feb 2026 10:23:04 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id 7CDCFE41AE3; 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 0/4] io_uring/uring_cmd: allow non-iopoll cmds with IORING_SETUP_IOPOLL Date: Thu, 19 Feb 2026 10:22:23 -0700 Message-ID: <20260219172228.429479-1-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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(). Use a new REQ_F_IOPOLL flag to track whether a request is using iopoll. This makes the iopoll_queue opcode definition flag unnecessary. The last commit removes an unnecessary IO_URING_F_IOPOLL check in nvme_dev_uring_cmd() as NVMe admin passthru commands can be issued to IORING_SETUP_IOPOLL io_urings now. v3: fix REW -> REQ typo (Anuj) v2: - Add REQ_F_IOPOLL request flag, remove redundant iopoll_queue - Split IORING_OP_URING_CMD128 fix to a separate commit Caleb Sander Mateos (4): io_uring: add REQ_F_IOPOLL io_uring: remove iopoll_queue from struct io_issue_def io_uring/uring_cmd: allow non-iopoll cmds with IORING_SETUP_IOPOLL nvme: remove nvme_dev_uring_cmd() IO_URING_F_IOPOLL check drivers/nvme/host/ioctl.c | 4 ---- include/linux/io_uring_types.h | 3 +++ io_uring/io_uring.c | 10 ++++------ io_uring/opdef.c | 10 ---------- io_uring/opdef.h | 2 -- io_uring/rw.c | 11 ++++++----- io_uring/uring_cmd.c | 9 ++++----- 7 files changed, 17 insertions(+), 32 deletions(-) -- 2.45.2