linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Javier González" <javier@javigon.com>
To: mb@lightnvm.io
Cc: igor.j.konopko@intel.com, marcin.dziegielewski@intel.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Javier González" <javier@cnexlabs.com>
Subject: [PATCH 2/3] lightnvm: do no update csecs and sos on 1.2
Date: Wed, 29 Aug 2018 12:09:29 +0200	[thread overview]
Message-ID: <1535537370-10729-3-git-send-email-javier@cnexlabs.com> (raw)
In-Reply-To: <1535537370-10729-1-git-send-email-javier@cnexlabs.com>

In the OCSSD 2.0 spec., the sector and metadata sizes are reported though
the standard nvme identify command. Thus, the lightnvm subsystem needs
to update this information on the geometry structure on bootup.

Since 1.2 devices report these values on the OCSSD geometry identify,
avoid this update is it is unnecessary and can also corrupt the geometry
if the devices does not report the nvme sizes correctly (which is not
required by the OCSSD 1.2 spec either)

Signed-off-by: Javier González <javier@cnexlabs.com>
---
 drivers/nvme/host/lightnvm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 5bfa354c5dd5..33ed09f8410e 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -980,6 +980,9 @@ void nvme_nvm_update_nvm_info(struct nvme_ns *ns)
 	struct nvm_dev *ndev = ns->ndev;
 	struct nvm_geo *geo = &ndev->geo;
 
+	if (geo->version == NVM_OCSSD_SPEC_12)
+		return;
+
 	geo->csecs = 1 << ns->lba_shift;
 	geo->sos = ns->ms;
 }
-- 
2.7.4


  parent reply	other threads:[~2018-08-29 10:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 10:09 [PATCH 0/3] lightnvm: pblk: support variable OOB size Javier González
2018-08-29 10:09 ` [PATCH 1/3] lightnvm: use internal allocation for chunk log page Javier González
2018-09-07 10:38   ` Matias Bjørling
2018-09-07 12:53   ` Hans Holmberg
2018-09-07 15:12     ` Matias Bjørling
2018-08-29 10:09 ` Javier González [this message]
2018-09-07 10:28   ` [PATCH 2/3] lightnvm: do no update csecs and sos on 1.2 Matias Bjørling
2018-09-11  8:50     ` Javier Gonzalez
2018-09-11 11:30       ` Javier Gonzalez
2018-09-18  8:37         ` Matias Bjørling
2018-08-29 10:09 ` [PATCH 3/3] lightnvm: pblk: support variable OOB size Javier González
2018-09-10 10:21   ` Matias Bjørling
2018-09-11  9:14     ` Javier Gonzalez
2018-09-11 10:22       ` Igor Konopko
2018-09-18  8:09         ` Javier Gonzalez
2018-09-18  8:31           ` Matias Bjørling
2018-09-18  8:32             ` Javier Gonzalez
2018-10-05 12:18               ` Javier Gonzalez
2018-10-09  9:16                 ` Matias Bjørling
2018-10-09 12:31                   ` Javier Gonzalez
2018-08-29 14:51 ` [PATCH 0/3] " Igor Konopko
2018-08-29 19:57   ` Javier Gonzalez

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=1535537370-10729-3-git-send-email-javier@cnexlabs.com \
    --to=javier@javigon.com \
    --cc=igor.j.konopko@intel.com \
    --cc=javier@cnexlabs.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.dziegielewski@intel.com \
    --cc=mb@lightnvm.io \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).