From nobody Tue Apr 7 18:46:41 2026 Received: from mail-oo1-f98.google.com (mail-oo1-f98.google.com [209.85.161.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 9C84A44CAE7 for ; Thu, 26 Feb 2026 19:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.98 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772132670; cv=none; b=AHS6HvafTVGp+p8wfTwsKjkbv4LEoC4GqzEU8EaWNssE7FrY4Jk4ST/GPmgJzJ44eZETKf4LvPSyulrOQzLf20n4+rb6vNdxzhtqhTGjQPpteM8X8RKG694MJD0063PyrPFbVQezLTie097eFDuchzIIuV+oh+z801GSIGEqw6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772132670; c=relaxed/simple; bh=LBTWfeRPdfoLnL0Unw4JDSNyHmrp0ho+YMkjp8rQRJY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pmCkLBlMWj7dJ6Fizw0olBO38oprAxWoG94s83HEb0ecZTtVzzL2fHlLQ9t4ygaV0WFtOoopyOt6/ABWbi59nm00xJvEBxZ0Ymy+tK37w8JIynja3ccNX/G6mgAv6I7AFfSSFGuHp8SDOpcJmi/a7dXp6ZSoLYNn3CxS0+9/bvw= 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=QP2WVbSx; arc=none smtp.client-ip=209.85.161.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="QP2WVbSx" Received: by mail-oo1-f98.google.com with SMTP id 006d021491bc7-678061ab66eso49044eaf.3 for ; Thu, 26 Feb 2026 11:04:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1772132661; x=1772737461; 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=qC1PH2EFy1+JEy/LIGlvD7SDeva8ogk5m5U5Vw+2yf4=; b=QP2WVbSxcxulYu6/Z6zLOB4gIlG5xNpeTz2xyqqZQHywOhXkA+oNELp4oWbtn67jSb 29F1rgmo4cLOG2nyr0LIPEOM+7Fb7aQs80mneoyGer0ZfIYp25uxUuEvve5fzw/D84lk kIGzpK6ekRJaJiYeY+73hlk+0eDMzM4+Skb4MUa+phyjYDHdx9KJDHkQh4T4750t6IH2 oMekkEkwsgL4QFTe6xzW7nNqu9rAdPKhM1Ll36BboC0JhyoOTZz/SJrlZjTsyg0PsoSM Pt9rx5l3a2dALpExiKsoQ6P3qDOtPwE+y/oaGLCU0QbXaPZgT9HTfqT5znaWgfZnPuP8 5jZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772132661; x=1772737461; 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=qC1PH2EFy1+JEy/LIGlvD7SDeva8ogk5m5U5Vw+2yf4=; b=OWhtHR7E1VeY4n6REC+mWyzh8l2C560hzgQQJ0AfEG9Z0hDvTx2OXoouUAw4+hDLkX 2sIwmWs7VTxCYnf3QgUpbgnhFMdc3FyE5VW2aCsUdyIs9EzGqaQX4V0ytwiZAg4HKGvF cBJEntzy1vgWifF5UCtUV2zwN87jf2jkqUmVtGa1mDGHAgr8vCubwgsYVEn5s4h03vla Rjnz+YuzlY3b7I94P62EHvoA5MRIFQgeqSe13RA86OoUL3bsAZd9m59DRohX1g1oZYsi HTOVx/wUyxzR1F/y81nNFg7pyNoeitAFVqA4oRqkKWuRx8QuGd7vdySGUbuHkwZMn2Mo O5MA== X-Forwarded-Encrypted: i=1; AJvYcCV1kweIffi1A/Z5bUbKrZvNpLpCJgtxOZjSwjxnqz6Cz1o6u6YH/iQclW1fBERtlUDmldz+w97PJiOG97Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwxH/yWljZeemjyIj5Ux3sTWp4+e5dJq3WxA27+zC538ZTJakTe aqEUCq5T6YSHa8eWk5Ch60pKvIDbgSVE4DE1rIgNWLCGftChecrXJwLByDHQceOzfQiEEgyn73Z CeRQ4tnpZk5ewX0Dp4zl1C1mRjKu3gsUb3rmC X-Gm-Gg: ATEYQzxS7dVmExn7++0UygZk7XCpQyfROm0Y4bhDgi4mEFq1z71Z+i/eIb7kDjAZhBs 5yCwM4S6NdTMhBrX851+74bKjBHy+oAzJ8Yxvs8EV7BQ6Ai8Ip4cf0QrbZ7Hmvz1sW5P6B/7hEI es3hSpDFIyjX8Y3pwwgWwpQyDSCKyceuu7XHiSbRdMCBjUy/x/cAEQly17C3V1OngFTRY6AVNYc 8ss8R+FB/jc7knxB12mn8at2L/cD8Mm+AxP5p1R0c5rvOFOwc3R+TC4CjibcztKUk/T515pu3yt 0KHQEgnNTRTyyzEX2fkEloAOsflVrzJnOsts9AcIxaDQ1dLjpXfjGXIh4tcENFmLoqnS7TjgijD ZgBNXhEwJnoV4gCHa5OGiMhzuymD6inYoSZNUbKmvf2y/rtugWmhAsQ== X-Received: by 2002:a05:6870:fba0:b0:3e0:de76:31da with SMTP id 586e51a60fabf-41627039f55mr138150fac.4.1772132661105; Thu, 26 Feb 2026 11:04:21 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.128]) by smtp-relay.gmail.com with ESMTPS id 586e51a60fabf-4160cfd4986sm369477fac.6.2026.02.26.11.04.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 11:04:21 -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 4D21F3420BE; Thu, 26 Feb 2026 12:04:20 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id 48515E41254; Thu, 26 Feb 2026 12:04:20 -0700 (MST) From: Caleb Sander Mateos To: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Caleb Sander Mateos Subject: [PATCH v4 4/8] nvme: always issue I/O Command Set specific Identify Namespace Date: Thu, 26 Feb 2026 12:04:11 -0700 Message-ID: <20260226190416.297725-5-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260226190416.297725-1-csander@purestorage.com> References: <20260226190416.297725-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, the I/O Command Set specific Identify Namespace structure is only fetched for controllers that support extended LBA formats. This is because struct nvme_id_ns_nvm is only used by nvme_configure_pi_elbas(), which is only called when the ELBAS bit is set in the CTRATT field of the Identify Controller structure. However, the I/O Command Set specific Identify Namespace structure will soon be used in nvme_update_disk_info(), so always try to obtain it in nvme_update_ns_info_block(). This Identify structure is first defined in NVMe spec version 2.0, but controllers reporting older versions could still implement it. Signed-off-by: Caleb Sander Mateos Reviewed-by: Christoph Hellwig --- drivers/nvme/host/core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index bff6f26d7bcf..14e52b260f5d 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2352,15 +2352,13 @@ static int nvme_update_ns_info_block(struct nvme_ns= *ns, ret =3D -ENXIO; goto out; } lbaf =3D nvme_lbaf_index(id->flbas); =20 - if (ns->ctrl->ctratt & NVME_CTRL_ATTR_ELBAS) { - ret =3D nvme_identify_ns_nvm(ns->ctrl, info->nsid, &nvm); - if (ret < 0) - goto out; - } + ret =3D nvme_identify_ns_nvm(ns->ctrl, info->nsid, &nvm); + if (ret < 0) + goto out; =20 if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) && ns->head->ids.csi =3D=3D NVME_CSI_ZNS) { ret =3D nvme_query_zone_info(ns, lbaf, &zi); if (ret < 0) --=20 2.45.2