Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-10-31 10:48:30 +0100
committerJohannes Thumshirn <jthumshirn@suse.de>2018-10-31 10:49:00 +0100
commit84403a8842860d3256c60c1ae6a7ad30e071ffaf (patch)
tree61acca508e9fd844435ba1eb3e7462f68cbdf434
parent316addf534ddb59e0d668cf7ff83c62361ff7f7e (diff)
nvdimm: Clarify comment in sizeof_namespace_index (bsc#1111921,
bsc#1113408, FATE#326765).
-rw-r--r--patches.fixes/nvdimm-clarify-comment-in-sizeof_namespace_index.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.fixes/nvdimm-clarify-comment-in-sizeof_namespace_index.patch b/patches.fixes/nvdimm-clarify-comment-in-sizeof_namespace_index.patch
new file mode 100644
index 0000000000..bc6890d4d4
--- /dev/null
+++ b/patches.fixes/nvdimm-clarify-comment-in-sizeof_namespace_index.patch
@@ -0,0 +1,40 @@
+From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
+Date: Wed, 10 Oct 2018 16:38:55 -0700
+Subject: nvdimm: Clarify comment in sizeof_namespace_index
+Git-commit: 1cfeb66e8e137be8e01b88bb4d416e987abda4a4
+Patch-mainline: v4.20-rc1
+References: bsc#1111921, bsc#1113408, FATE#326765
+
+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>
+Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
+---
+ drivers/nvdimm/label.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+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);
+
diff --git a/series.conf b/series.conf
index 8c3c191e12..0cd4fdd881 100644
--- a/series.conf
+++ b/series.conf
@@ -18054,6 +18054,7 @@
patches.drivers/net-smc-retain-old-name-for-diag_mode-field.patch
patches.fixes/libnvdimm-dimm-maximize-label-transfer-size.patch
patches.fixes/nvdimm-sanity-check-labeloff.patch
+ patches.fixes/nvdimm-clarify-comment-in-sizeof_namespace_index.patch
# davem/net
patches.fixes/udp-Unbreak-modules-that-rely-on-external-__skb_recv.patch