OSDN Git Service

libnvdimm, label: change nvdimm_num_label_slots per UEFI 2.7
authorToshi Kani <toshi.kani@hpe.com>
Fri, 23 Feb 2018 21:59:22 +0000 (14:59 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 15 Mar 2018 20:59:57 +0000 (13:59 -0700)
commit9e694d9c18dde0fa57ec067043b581bd57c9fb65
tree7d5634572ffbbeaa7088f278d814d8cdfb85d839
parent36de6f518f2e323cb82683d1ee5f62c48b05e8ee
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.

Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/label.c