Re: [PATCH v5 0/8] nvme: set discard_granularity from NPDG/NPDA
From: Caleb Sander Mateos
Date: Mon Mar 23 2026 - 12:14:54 EST
On Mon, Mar 2, 2026 at 10:54 AM Keith Busch <kbusch@xxxxxxxxxx> 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.
Hi Keith, I see this series in the nvme-7.1 tree, but it looks like
you might have accidentally applied v4 instead of v5? I don't see a
few of the changes I made in response to your comments on the last
revision.
Thanks,
Caleb