mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
libnvdimm, namespace: record 'lbasize' for pmem namespaces
Commitf979b13c3c
"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:f979b13c3c
("libnvdimm, label: honor the lba size specified in v1.2 labels") Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
807900395e
commit
2de5148ffb
1 changed files with 1 additions and 0 deletions
|
@ -660,6 +660,7 @@ static int __pmem_label_update(struct nd_region *nd_region,
|
||||||
nd_label->position = __cpu_to_le16(pos);
|
nd_label->position = __cpu_to_le16(pos);
|
||||||
nd_label->isetcookie = __cpu_to_le64(cookie);
|
nd_label->isetcookie = __cpu_to_le64(cookie);
|
||||||
nd_label->rawsize = __cpu_to_le64(resource_size(res));
|
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->dpa = __cpu_to_le64(res->start);
|
||||||
nd_label->slot = __cpu_to_le32(slot);
|
nd_label->slot = __cpu_to_le32(slot);
|
||||||
if (namespace_label_has(ndd, type_guid))
|
if (namespace_label_has(ndd, type_guid))
|
||||||
|
|
Loading…
Reference in a new issue