nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
To: dan.j.williams@intel.com, linux-nvdimm@lists.01.org
Cc: alexander.h.duyck@linux.intel.com, zwisler@kernel.org
Subject: [nvdimm PATCH 3/6] nvdimm: Clarify comment in sizeof_namespace_index
Date: Wed, 10 Oct 2018 16:38:55 -0700	[thread overview]
Message-ID: <20181010233847.12228.24818.stgit@localhost.localdomain> (raw)
In-Reply-To: <20181010233428.12228.26106.stgit@localhost.localdomain>

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.

Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
---
 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);

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

  parent reply	other threads:[~2018-10-10 23:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 23:36 [nvdimm PATCH 0/6] Label initialization time optimizations Alexander Duyck
2018-10-10 23:38 ` [nvdimm PATCH 1/6] libnvdimm, dimm: Maximize label transfer size Alexander Duyck
2018-10-10 23:38 ` [nvdimm PATCH 2/6] nvdimm: Sanity check labeloff Alexander Duyck
2018-10-10 23:38 ` Alexander Duyck [this message]
2018-10-10 23:39 ` [nvdimm PATCH 4/6] nvdimm: Remove empty if statement Alexander Duyck
2018-10-10 23:39 ` [nvdimm PATCH 5/6] nvdimm: Split label init out from the logic for getting config data Alexander Duyck
2018-10-10 23:39 ` [nvdimm PATCH 6/6] nvdimm: Use namespace index data to reduce number of label reads needed Alexander Duyck
2018-10-12  1:35   ` Dan Williams
2018-10-11  4:48 ` [nvdimm PATCH 0/6] Label initialization time optimizations Dan Williams
2018-10-12 15:36 ` Kani, Toshi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181010233847.12228.24818.stgit@localhost.localdomain \
    --to=alexander.h.duyck@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=zwisler@kernel.org \
    --subject='Re: [nvdimm PATCH 3/6] nvdimm: Clarify comment in sizeof_namespace_index' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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