From patchwork Tue Oct 9 11:12:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10632281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F3F2E15E8 for ; Tue, 9 Oct 2018 11:16:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4AD528A5E for ; Tue, 9 Oct 2018 11:16:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8BF028A6F; Tue, 9 Oct 2018 11:16:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A2DD28A5E for ; Tue, 9 Oct 2018 11:16:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727271AbeJIScE (ORCPT ); Tue, 9 Oct 2018 14:32:04 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38536 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727237AbeJIScD (ORCPT ); Tue, 9 Oct 2018 14:32:03 -0400 Received: by mail-pf1-f196.google.com with SMTP id f29-v6so680369pff.5 for ; Tue, 09 Oct 2018 04:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ld8Cyo7wvWWxWUMW/IaZbWJk35j/A2DpbxU/gAK4BFI=; b=LsDMiSGpQovtR3pFkJ9NfMvz6PevcXtAu6sb5cZtNjHBWL5NkE2LTbmZR8fLgzVuAN rUwvEmYHAIOlSloJttNirKZsulPZLo5oi4ygNTLToSHK1rRMu7IMQsbDayp7Cvns2UIT /3Doz8PSTFLOZiLrKryI/9hiBawW+ZnpPLpZcRVim83o9Eb4j5x8yDsYh2Z3RRC2b1AA Xs3TyeHIy3OHBYJbTpoOQxis4BkRdUqXm2QUa14Gao4SkuHp6c29TYtcY60uF4LUxqng nYCx4rayVITsgbt7rbCtsxNVblkCzdL6Rf7iJ7p/W5R4uFDcukOi3nu+p9fxaCRvshGj 0tvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ld8Cyo7wvWWxWUMW/IaZbWJk35j/A2DpbxU/gAK4BFI=; b=KiFKFDWFF3cyLTyv19dCz6F2Z4nAR97yj0BA7f/LTIVEEqTdjPS2dcAOsW3fXULmIk J6bPl/UGO7+FVML2IXjalKB2uBgwp3EjxZhgbFuuG6mZMEkxXQYcG31LFiVbp8Dm7rgN tLn1L1MQCx4HNnFHiwAcNdOHtBJ74aJ5IvcrbHiDIJXj+XuVOrp5dxEd7q5yV7EOCImV X8AqiTwNf8hg3xNYHGaGND7hz9pIcVMQDFVSzi5QlD9Tc1ASihgD+xOSCI/XowJ28hnT ng4aH30NSfU8t+er5jcsKBZa/xCaTQYppJ6DumAuEk854q7JZGQw0ZqkQfsr2sZXJv8K mfxA== X-Gm-Message-State: ABuFfoizwobXLFr04MV2D6uKCE+x8vf4inVvLDKvpPmGMDwEHLqV0xyi fq0ktkHflw4a3/FxYi3tWKT+UFLzoFnrvw== X-Google-Smtp-Source: ACcGV60n9/zfBBlUl7/Oh+31D9tQdbvGJY7HjFCd9pU1TxtkIpl0Aspet4IwJoXEArXaGLBnWY989Q== X-Received: by 2002:a63:cb51:: with SMTP id m17-v6mr24570149pgi.105.1539083736602; Tue, 09 Oct 2018 04:15:36 -0700 (PDT) Received: from skyninja.hgst.com (rap-us.hgst.com. [199.255.44.250]) by smtp.gmail.com with ESMTPSA id p1-v6sm25342380pff.128.2018.10.09.04.15.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 04:15:35 -0700 (PDT) From: =?utf-8?q?Matias_Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Jav?= =?utf-8?q?ier_Gonz=C3=A1lez?= , =?utf-8?q?Javier_Gonz?= =?utf-8?q?=C3=A1lez?= , =?utf-8?q?Matias_Bj=C3=B8rling?= Subject: [GIT PULL 42/45] lightnvm: do no update csecs and sos on 1.2 Date: Tue, 9 Oct 2018 13:12:12 +0200 Message-Id: <20181009111215.7653-43-mb@lightnvm.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181009111215.7653-1-mb@lightnvm.io> References: <20181009111215.7653-1-mb@lightnvm.io> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Javier González 1.2 devices exposes their data and metadata size through the separate identify command. Make sure that the NVMe LBA format does not override these values. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- 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 7d0a4d3b0a48..a4f3b263cd6c 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -977,6 +977,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; }