Searched hist:"02881768695 da29772f6f9e0d857a8637c6b0e90" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/drivers/nvdimm/ |
H A D | label.c | diff 02881768695da29772f6f9e0d857a8637c6b0e90 Tue Aug 29 20:28:18 CDT 2017 Dan Williams <dan.j.williams@intel.com> libnvdimm, label: fix index block size calculation
The old calculation assumed that the label space was 128k and the label size is 128. With v1.2 labels where the label size is 256 this calculation will return zero. We are saved by the fact that the nsindex_size is always pre-initialized from a previous 128 byte assumption and we are lucky that the index sizes turn out the same.
Fix this going forward in case we start encountering different geometries of label areas besides 128k.
Since the label size can change from one call to the next, drop the caching of nsindex_size.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
H A D | nd.h | diff 02881768695da29772f6f9e0d857a8637c6b0e90 Tue Aug 29 20:28:18 CDT 2017 Dan Williams <dan.j.williams@intel.com> libnvdimm, label: fix index block size calculation
The old calculation assumed that the label space was 128k and the label size is 128. With v1.2 labels where the label size is 256 this calculation will return zero. We are saved by the fact that the nsindex_size is always pre-initialized from a previous 128 byte assumption and we are lucky that the index sizes turn out the same.
Fix this going forward in case we start encountering different geometries of label areas besides 128k.
Since the label size can change from one call to the next, drop the caching of nsindex_size.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|