On Mon, 2019-01-14 at 19:51 -0800, Dan Williams wrote:
> Quoting from Linux kernel commit 9e694d9c18dd "libnvdimm, label: change
> nvdimm_num_label_slots per UEFI 2.7":
> 
>     sizeof_namespace_index() fails when NVDIMM devices have the minimum
>     1024 bytes label storage area.  nvdimm_num_label_slots() returns 3
>     slots while the area is only big enough for 2 slots.
> 
>     Change nvdimm_num_label_slots() to calculate a number of label slots
>     according to UEFI 2.7 spec.
> 
> Without this fix attempts to initialize labels on a small (1K) label
> area results in the following:
> 
> libndctl: sizeof_namespace_index: nmem2: label area (1024) too small to host 
> (128 byte) labels
> libndctl: sizeof_namespace_index: nmem2: label area (1024) too small to host 
> (256 byte) labels
> 
> Based on an original patch by Toshi Kani
> Fixes: bdaec95463ca ("ndctl: introduce 
> ndctl_dimm_{validate_labels,init_labels}")
> Reported-by: Sujith Pandel <[email protected]>
> Link: https://github.com/pmem/ndctl/issues/78
> Signed-off-by: Dan Williams <[email protected]>
> ---
>  ndctl/lib/dimm.c |   35 +++++++++++++++++++++++++----------
>  1 file changed, 25 insertions(+), 10 deletions(-)

Thanks, applied.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to