On Thu, Jul 5, 2018 at 1:17 PM, Keith Busch <keith.busch@xxxxxxxxx> wrote: > This patch will find the max contiguous area to determine the largest > namespace size that can be created. If the requested size exceeds the > largest available, ENOSPC error will be returned. > > This fixes the allocation underrun error and wrong error return code > that have otherwise been observed as the following kernel warning: > > WARNING: CPU: <CPU> PID: <PID> at drivers/nvdimm/namespace_devs.c:913 size_store > > Fixes: a1f3e4d6a0c3 ("libnvdimm, region: update nd_region_available_dpa() for multi-pmem support") > Cc: <stable@xxxxxxxxxxxxxxx> > Signed-off-by: Keith Busch <keith.busch@xxxxxxxxx> > --- > v1 -> v2: > > Updated changelog to indicate the warning this patch fixes and copy > stable. > > Fixed code comments with the correct name of a function Looks good to me, applied to my for-4.18/libnvdimm tracking branch.