[PATCH] nvme: implement non-mdts command limits

Keith Busch kbusch at kernel.org
Thu Mar 11 19:18:22 GMT 2021


On Thu, Mar 11, 2021 at 04:59:12PM +0100, Klaus Jensen wrote:
> On Mar 12 00:49, Keith Busch wrote:
> > On Thu, Mar 11, 2021 at 06:51:26AM +0100, Klaus Jensen wrote:
> > > On Mar 10 11:57, Keith Busch wrote:
> > > > +	if (id->dmrsl)
> > > > +		ctrl->max_discard_sectors = le32_to_cpu(id->dmrsl);
> > > 
> > > Since DMRSL is in terms of LBAs, should this use nvme_lba_to_sect?
> > 
> > We need a namespace for that, but we only have a controller for this
> > Identify.
> 
> Ah yes.
> 
> I remember now that I also complained loudly about this mistake in the
> spec when we implemented it in QEMU.

Worse case scenario is that our 512b assumption will get a slightly smaller
maximum DSM, but it should at least always be safe and successful. I think it
would be nice if the spec clears this up too.



More information about the Linux-nvme mailing list