|
Johannes Thumshirn |
e8e2f1 |
From: Dan Williams <dan.j.williams@intel.com>
|
|
Johannes Thumshirn |
e8e2f1 |
Date: Mon, 3 Jul 2017 16:30:44 -0700
|
|
Johannes Thumshirn |
e8e2f1 |
Subject: libnvdimm, namespace: record 'lbasize' for pmem namespaces
|
|
Johannes Thumshirn |
e8e2f1 |
Patch-mainline: v4.13-rc1
|
|
Johannes Thumshirn |
e8e2f1 |
Git-commit: 2de5148ffb12ff6b4088125f44818771e78e6830
|
|
Johannes Thumshirn |
e8e2f1 |
References: FATE#323731
|
|
Johannes Thumshirn |
e8e2f1 |
|
|
Johannes Thumshirn |
e8e2f1 |
Commit f979b13c3cc5 "libnvdimm, label: honor the lba size specified in
|
|
Johannes Thumshirn |
e8e2f1 |
v1.2 labels") neglected to update the 'lbasize' in the label when the
|
|
Johannes Thumshirn |
e8e2f1 |
namespace sector_size attribute was written. We need this value in the
|
|
Johannes Thumshirn |
e8e2f1 |
label for inter-OS / pre-OS compatibility.
|
|
Johannes Thumshirn |
e8e2f1 |
|
|
Johannes Thumshirn |
e8e2f1 |
Fixes: f979b13c3cc5 ("libnvdimm, label: honor the lba size specified in v1.2 labels")
|
|
Johannes Thumshirn |
e8e2f1 |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
Johannes Thumshirn |
e8e2f1 |
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
|
|
Johannes Thumshirn |
e8e2f1 |
---
|
|
Johannes Thumshirn |
e8e2f1 |
drivers/nvdimm/label.c | 1 +
|
|
Johannes Thumshirn |
e8e2f1 |
1 file changed, 1 insertion(+)
|
|
Johannes Thumshirn |
e8e2f1 |
|
|
Johannes Thumshirn |
e8e2f1 |
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
|
|
Johannes Thumshirn |
e8e2f1 |
index 922b68718a1a..87796f840777 100644
|
|
Johannes Thumshirn |
e8e2f1 |
--- a/drivers/nvdimm/label.c
|
|
Johannes Thumshirn |
e8e2f1 |
+++ b/drivers/nvdimm/label.c
|
|
Johannes Thumshirn |
e8e2f1 |
@@ -660,6 +660,7 @@ static int __pmem_label_update(struct nd_region *nd_region,
|
|
Johannes Thumshirn |
e8e2f1 |
nd_label->position = __cpu_to_le16(pos);
|
|
Johannes Thumshirn |
e8e2f1 |
nd_label->isetcookie = __cpu_to_le64(cookie);
|
|
Johannes Thumshirn |
e8e2f1 |
nd_label->rawsize = __cpu_to_le64(resource_size(res));
|
|
Johannes Thumshirn |
e8e2f1 |
+ nd_label->lbasize = __cpu_to_le64(nspm->lbasize);
|
|
Johannes Thumshirn |
e8e2f1 |
nd_label->dpa = __cpu_to_le64(res->start);
|
|
Johannes Thumshirn |
e8e2f1 |
nd_label->slot = __cpu_to_le32(slot);
|
|
Johannes Thumshirn |
e8e2f1 |
if (namespace_label_has(ndd, type_guid))
|
|
Johannes Thumshirn |
e8e2f1 |
--
|
|
Johannes Thumshirn |
e8e2f1 |
2.12.3
|
|
Johannes Thumshirn |
e8e2f1 |
|