Re: [PATCH v5 0/8] nvme: set discard_granularity from NPDG/NPDA
From: Keith Busch
Date: Mon Mar 02 2026 - 13:54:43 EST
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.