[nvme-4.13 V2] nvme: Implement NS Optimal IO Boundary from 1.3 Spec

Keith Busch keith.busch at intel.com
Thu Jun 15 10:03:02 PDT 2017


On Thu, Jun 15, 2017 at 12:57:31PM -0400, Keith Busch wrote:
> Let's say we've a large noiob (16k) with a 4k block size. The above would
> shift beyond 32-bits, so I would rewrite this as:
> 
> 	unsigned int chunk_size = (((u32)ns->noiob) << (ns->lba_shift - 9));

Oops, please disregard the fact I'm can't count overflow correctly...

I still prefer the alternate shift calculation, though.



More information about the Linux-nvme mailing list