summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-07-03 16:30:44 -0700
committerDan Williams <dan.j.williams@intel.com>2017-07-03 16:30:44 -0700
commit2de5148ffb12ff6b4088125f44818771e78e6830 (patch)
tree906ff26f0ff7c902c23293cb8f2818bbeaac4429
parent807900395efebf9276178eb6157959f2e81fe013 (diff)
libnvdimm, namespace: record 'lbasize' for pmem namespaces
Commit f979b13c3cc5 "libnvdimm, label: honor the lba size specified in v1.2 labels") neglected to update the 'lbasize' in the label when the namespace sector_size attribute was written. We need this value in the label for inter-OS / pre-OS compatibility. Fixes: f979b13c3cc5 ("libnvdimm, label: honor the lba size specified in v1.2 labels") Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/nvdimm/label.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 922b68718a1a..87796f840777 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -660,6 +660,7 @@ static int __pmem_label_update(struct nd_region *nd_region,
nd_label->position = __cpu_to_le16(pos);
nd_label->isetcookie = __cpu_to_le64(cookie);
nd_label->rawsize = __cpu_to_le64(resource_size(res));
+ nd_label->lbasize = __cpu_to_le64(nspm->lbasize);
nd_label->dpa = __cpu_to_le64(res->start);
nd_label->slot = __cpu_to_le32(slot);
if (namespace_label_has(ndd, type_guid))