summaryrefslogtreecommitdiff
path: root/drivers/nvdimm/label.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@linux.intel.com>2018-10-11 02:38:55 +0300
committerDan Williams <dan.j.williams@intel.com>2018-10-12 18:39:10 +0300
commit1cfeb66e8e137be8e01b88bb4d416e987abda4a4 (patch)
tree42e01fdba0eceed4b5e0a42ae5053c3deacc51d2 /drivers/nvdimm/label.c
parentd86d4d63d88861107d3bfc84be7294552231ecd0 (diff)
downloadlinux-1cfeb66e8e137be8e01b88bb4d416e987abda4a4.tar.xz
nvdimm: Clarify comment in sizeof_namespace_index
When working on the label code I found it rather confusing to see several spots that reference a minimum label size of 256 while working with labels that are 128 bytes in size. This patch is meant to provide a clarification on one of the comments that was at the heart of the issue. Specifically for version 1.2 and later of the namespace specification the minimum label size is 256, prior to that the minimum label size was 128. So we should state that as such to avoid confusion. Reviewed-by: Toshi Kani <toshi.kani@hpe.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/label.c')
-rw-r--r--drivers/nvdimm/label.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 1f5842509dbc..bb813b8e8ace 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -75,7 +75,8 @@ size_t sizeof_namespace_index(struct nvdimm_drvdata *ndd)
/*
* Per UEFI 2.7, the minimum size of the Label Storage Area is large
* enough to hold 2 index blocks and 2 labels. The minimum index
- * block size is 256 bytes, and the minimum label size is 256 bytes.
+ * block size is 256 bytes. The label size is 128 for namespaces
+ * prior to version 1.2 and at minimum 256 for version 1.2 and later.
*/
nslot = nvdimm_num_label_slots(ndd);
space = ndd->nsarea.config_size - nslot * sizeof_namespace_label(ndd);