From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F5A63542E2 for ; Mon, 2 Mar 2026 18:54:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772477681; cv=none; b=eXaojAWRzqTbTnh0Dl+abDUsGfzG/ncjHGU9Ku57gPrPE1Uszf8UCX1ZhfbEJxuseI0WJqXlG0WQUHQE98r1uE6X8hzPAS3pi+Y1YJedowRfOMP3OvazTKR0PKJm1pvuqC2ACgBaTaUo9n5ci84EP1HwkcNZGQzl3p1LCauw1JA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772477681; c=relaxed/simple; bh=B6RABV+2sKmH3UJl17RfkN2Nlrsthhw/oriEucsl2XQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=crWmRiKKliT4+7PLp58e8oD6aCeoFQQP1kl6MagdZyTy5u9K8mECv3cLH4UMRxh5rUPiSLQquUJ92vjrmoT+CibPKO0azEBx1Nv+W6NP33XfiBqw2HCanwQXax2u/bwkRNDz++mwoALD9esmPjFn5zB/bHWz8NrXeaZ3n6+vFnY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Q8fjlZa+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q8fjlZa+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE09EC19423; Mon, 2 Mar 2026 18:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772477681; bh=B6RABV+2sKmH3UJl17RfkN2Nlrsthhw/oriEucsl2XQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q8fjlZa+jBlpVsZMeHHL28R9KWa46ataY8bulVnAsAy7OdmbAtrF4PVc5ctzBx/P1 vtDD5mxKNEvU/TEhQguOwpzhnXV+0bO3HSP1It6uyp1H5FsGQgWuQXBaE8SLPGa9VX AGTOxFidOtgw38QtIY0ZiJNGrS08+Upr3ton+QX0Th5So+nu8A6fo5l9EqPxEvH13l rK+dCpcwW9t56h9pWMc8FiH8souTIC+XmpNgjHGycth6SxSDWvxDgCPhGyo33jnT/M 8AwL1J77g00YYnr5LQEdwq7GC7vNic7AkGxbIU8XxY+xSN9vAVztJKJ2YF10IKUAOv x7Em2GQvJVDjw== Date: Mon, 2 Mar 2026 11:54:38 -0700 From: Keith Busch To: Caleb Sander Mateos Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/8] nvme: set discard_granularity from NPDG/NPDA Message-ID: References: <20260227202354.1012322-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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260227202354.1012322-1-csander@purestorage.com> On Fri, Feb 27, 2026 at 01:23:45PM -0700, Caleb Sander Mateos wrote: > NVMe block devices always report the logical block size for the > discard_granularity queue limit. However, more accurate values may be > available in the NPDG/NPDA fields of the Identify Namespace structure or > the NPDGL/NPDAL fields of the NVM Command Set Specific Identify > Namespace structure. So use these values to compute discard_granularity. > > Also fix the use of the OPTPERF field to better comply with version 2.1 > of the NVMe spec. > > Update the target side to report NPDGL and NPDAL as well, in case the > discard granularity doesn't fit in the 16-bit NPDG and NPDA fields. This series looks good to me. I'll queue it up later this week. I just want to get a pull request for my currently way-behind 7.0 nvme commits, then rebase the tree for new stuff.