Received: by 10.223.185.116 with SMTP id b49csp2601660wrg; Mon, 12 Feb 2018 12:23:08 -0800 (PST) X-Google-Smtp-Source: AH8x227WEO+MNM3C8syQ6IFAdkjgXhFAXGRMHWqEDocr1aYUjz63A6HukReG9I+2bf8lNZpP9SNU X-Received: by 10.101.80.130 with SMTP id r2mr10051896pgp.107.1518466988368; Mon, 12 Feb 2018 12:23:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518466988; cv=none; d=google.com; s=arc-20160816; b=daBFFpVPb1pD78kAS2cMpZ9oAhBVUPT2BbV2f1hWvEIkzv4RtiGXpdrBK9BZao81nT wBZpHw8UEe6GiGdolw9xrFWdAZ8//Lm7/oE3UVAPgv7HZR1EGHBvds2YGCIwegeDq5e1 gUbLb97UU+SCylttRKWUBGoUSQCl4Jfv9ptnTnZZ6ffmLL1Vmi4hStMQeHdIJLzOAHIA h6xsFms1FjrRhT44hrMIRmMetleMryoYc8rtIY4tdLhYTRQAOK/J96VacAQmWIOFld5O 8x76oSrb+eHzOebrAh480TATteC2vzwxO1NKt/f6oWZD0vSnZfrpUwmIz6pbetuthlEQ kBCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=q97UCI+Le9cuimcGTpnWfUY8DRB8pvKJBXY/AQIcuVA=; b=Wi6af6vsYA1ypq3uySDcEB1BVdMDGXBBecQ2AHJb76U3pZgxMoLnkVw6P0c3ayRYvy wyzQkeXhJPFCNwwZrx115Rhoj8CnII8rfB3zr/DLaMxnENU5l5E/U1o9R1TH9gd4LHBO OfyZ5O+toR7l/MB6y/CZG+Elrj1lvn0Y5ll97v4EFS3WoNVNV8BAvRHC0MQAm3+iqs8s jTdgmi380HPydKkcOpo2FX6X/yCnLwex38DzdmJk4twvrY8qWoPoWstoRx9h4I119wgv wjU+6yR40WkFUiYb+6JRAY6DHyOmbzZrzShHyjhftAZ25c90CcrR5HhLTezWf1qvUg+w ZMoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cnexlabs.onmicrosoft.com header.s=selector1-cnexlabs-com header.b=kyjzW5xe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j76si24930pfj.146.2018.02.12.12.22.53; Mon, 12 Feb 2018 12:23:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cnexlabs.onmicrosoft.com header.s=selector1-cnexlabs-com header.b=kyjzW5xe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753244AbeBLUVz (ORCPT + 99 others); Mon, 12 Feb 2018 15:21:55 -0500 Received: from mail-bl2nam02on0071.outbound.protection.outlook.com ([104.47.38.71]:58687 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751021AbeBLUVx (ORCPT ); Mon, 12 Feb 2018 15:21:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cnexlabs.onmicrosoft.com; s=selector1-cnexlabs-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=q97UCI+Le9cuimcGTpnWfUY8DRB8pvKJBXY/AQIcuVA=; b=kyjzW5xe3Y2jw0YPPCuMuhPZAbhgEA+yQVg/rFsiq93NQO88C9I1vaxkyRuuKiDZ5vFmBis+MFqOoKBd6xJPT3NR8G/xXf/K7tJdCawFTTVo2B8GOMZHi/mswVULVue1+MOoYy1X2u2xiZmDJJoq1v04Ua9iR4aeT+olfPkvNEk= Received: from BN6PR06MB2626.namprd06.prod.outlook.com (10.173.145.22) by BN6PR06MB2532.namprd06.prod.outlook.com (10.173.22.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Mon, 12 Feb 2018 20:21:49 +0000 Received: from BN6PR06MB2626.namprd06.prod.outlook.com ([10.173.145.22]) by BN6PR06MB2626.namprd06.prod.outlook.com ([10.173.145.22]) with mapi id 15.20.0485.015; Mon, 12 Feb 2018 20:21:49 +0000 From: Javier Gonzalez To: =?utf-8?B?TWF0aWFzIEJqw7hybGluZw==?= CC: "linux-block@vger.kernel.org" , LKML , "linux-nvme@lists.infradead.org" Subject: Re: [PATCH V2 4/4] nvme: lightnvm: add late setup of block size and metadata Thread-Topic: [PATCH V2 4/4] nvme: lightnvm: add late setup of block size and metadata Thread-Index: AQHToYhGel+Ul19qFEGj6ERuTHrKtaOhOyIA Date: Mon, 12 Feb 2018 20:21:49 +0000 Message-ID: <098A1343-A9FB-47BD-A4B5-6E77A1861A4B@cnexlabs.com> References: <20180209092719.10679-1-mb@lightnvm.io> <20180209092719.10679-5-mb@lightnvm.io> In-Reply-To: <20180209092719.10679-5-mb@lightnvm.io> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=javier@cnexlabs.com; x-originating-ip: [50.207.153.190] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN6PR06MB2532;7:nfk1DjwtoR8GXNq4hJCIgFLedmP5IlxMQoLbae4AwTLxeeFkuWcwjh5sc2BHDN+fOyt+Mdbg3USpouc2ZLVqOMjg3oiB8GAccKLCBkY1XmIlK0HnrrXjtG07HDnqe8h6ncrdzadIAulPodzITFq32TWYWOmUTAI1tHFOuWm/ulKFpyE37DG4MYnrGxGrcGk9VaUT4j4gN775iuanUDziu3GdX54SlvgbGEQgZ0dKciTItsxnTbHuHxg1++kieHZW x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: b2433a0c-5058-4894-6fea-08d572563f42 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(49563074)(7193020);SRVR:BN6PR06MB2532; x-ms-traffictypediagnostic: BN6PR06MB2532: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(102415395)(6040501)(2401047)(5005006)(8121501046)(10201501046)(3231101)(2400082)(944501161)(93006095)(93001095)(3002001)(6041288)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:BN6PR06MB2532;BCL:0;PCL:0;RULEID:;SRVR:BN6PR06MB2532; x-forefront-prvs: 0581B5AB35 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39380400002)(346002)(39840400004)(396003)(376002)(199004)(189003)(6486002)(8676002)(8936002)(6436002)(106356001)(316002)(25786009)(26005)(305945005)(77096007)(6512007)(6916009)(2950100002)(83716003)(7736002)(186003)(54906003)(229853002)(102836004)(68736007)(5660300001)(81156014)(81166006)(6116002)(3846002)(478600001)(53936002)(99286004)(2906002)(3280700002)(99936001)(3660700001)(97736004)(82746002)(36756003)(6506007)(4326008)(105586002)(33656002)(59450400001)(14454004)(76176011)(6246003)(66066001)(86362001)(2900100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR06MB2532;H:BN6PR06MB2626.namprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: cnexlabs.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: g/XAcwL26DaZSl/KelgTyYBh9daHcUYcQDnWnhK44z8hzy3YOlL7KemVKJJYB6tL/xavzbKskB9yWmOMM0KEew== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/signed; boundary="Apple-Mail=_E4450FA5-2150-4D0B-87C9-AC311466B328"; protocol="application/pgp-signature"; micalg=pgp-sha512 MIME-Version: 1.0 X-OriginatorOrg: cnexlabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2433a0c-5058-4894-6fea-08d572563f42 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Feb 2018 20:21:49.6084 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e40dfc2e-c6c1-463a-a598-38602b2c3cff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR06MB2532 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_E4450FA5-2150-4D0B-87C9-AC311466B328 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 9 Feb 2018, at 01.27, Matias Bj=C3=B8rling wrote: >=20 > The nvme driver sets up the size of the nvme namespace in two steps. > First it initializes the device with standard logical block and > metadata sizes, and then sets the correct logical block and metadata > size. Due to the OCSSD 2.0 specification relies on the namespace to > expose these sizes for correct initialization, let it be updated > appropriately on the LightNVM side as well. >=20 > Signed-off-by: Matias Bj=C3=B8rling > --- >=20 This late initialization breaks ligthnvm's core init since the sector size (csecs) is used on the first init part to set the logical block = size. nvm_core_init -> blk_queue_logical_block_size(dev->q, dev_geo->c.csecs); We can do do a nvme_nvm_revalidate and set this on the revalidation path instead of simply updating the info as in nvme_nvm_update_nvm_info(). Javier --Apple-Mail=_E4450FA5-2150-4D0B-87C9-AC311466B328 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE+ws7Qq+qZPG1bJoyIX4xUKFRnnQFAlqB91gACgkQIX4xUKFR nnQxbxAAydq8diQ9d+x+W8742it3pffX7sqxY967LC2tcFvrmj8El2smPAD1P5wk g2QWRAZ7gTkWX/dfVO9HxSCyV2+IAl1/TJVOK1PvL8IELGnuwgrhBFDyu3ox/83A yzNEAFSklDVlboEcm6vpCmNkniJCbABXHfrZX6gHMgQNmGnL3fIgL3Os1IcABBHd J0Hk9YRjuSnipuONTeZhLh/OLe1oxdXDuVvHMuW0HQXneLGjjfmylKXgzdHXQc08 ZVRRgrZSEYWWeIzb+dGZkEng7BaRm7W2/v8e+85G26TPZQcNz2Jbtys3iWAhAE6/ 8nsub/hDr6KZWrhvpwz0aO7mhnDKXHYrlGhgiW9bGa/8lyJO+cXgp+k9Kpe+Xvv6 rUZinkiS8EEfSAPuGQHYMUOkc0yQdW3gUM8yDFOA+j/WpE+bIEH8LHdJQSptUwja YF3bNv900ifSsXuUrHqS3cMlWUSdhaytAo5VS6kR2Xt1ULjCT6ftoK/0U39MCqP2 fBPI+gR0oaP6dG4pdR+AuEH3zfz4Bin6eMEIu82boPYbPlWgeVEO6vaTiZaLgMea ln6Cthk/D8vu2vMVgVnRHYrk9GRc6Om2vomAY1i67RXZqx6gy8dvUWqPm/V9zttj NS5rAOmcaWp7a3g2WIVZ0NoYaSdZ05k4j0D1uhBOd0XJRDz13iQ= =0okX -----END PGP SIGNATURE----- --Apple-Mail=_E4450FA5-2150-4D0B-87C9-AC311466B328--