Skip to content

Commit 2de5148

Browse files
committed
libnvdimm, namespace: record 'lbasize' for pmem namespaces
Commit f979b13 "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: f979b13 ("libnvdimm, label: honor the lba size specified in v1.2 labels") Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 8079003 commit 2de5148

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/nvdimm/label.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ static int __pmem_label_update(struct nd_region *nd_region,
660660
nd_label->position = __cpu_to_le16(pos);
661661
nd_label->isetcookie = __cpu_to_le64(cookie);
662662
nd_label->rawsize = __cpu_to_le64(resource_size(res));
663+
nd_label->lbasize = __cpu_to_le64(nspm->lbasize);
663664
nd_label->dpa = __cpu_to_le64(res->start);
664665
nd_label->slot = __cpu_to_le32(slot);
665666
if (namespace_label_has(ndd, type_guid))

0 commit comments

Comments
 (0)