nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] libnvdimm, namespace: record 'lbasize' for pmem namespaces
@ 2017-07-05 20:59 Dan Williams
  0 siblings, 0 replies; only message in thread
From: Dan Williams @ 2017-07-05 20:59 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: linux-kernel

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>
---
 drivers/nvdimm/label.c |    1 +
 1 file changed, 1 insertion(+)

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))

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-05 21:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-05 20:59 [PATCH] libnvdimm, namespace: record 'lbasize' for pmem namespaces Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).