[PATCH v5 0/8] nvme: set discard_granularity from NPDG/NPDA

Caleb Sander Mateos csander at purestorage.com
Mon Mar 2 11:04:21 PST 2026


On Mon, Mar 2, 2026 at 10:54 AM Keith Busch <kbusch at kernel.org> wrote:
>
> 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.

Sounds good, no rush

Thanks,
Caleb



More information about the Linux-nvme mailing list