Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5041034imm; Tue, 21 Aug 2018 05:25:49 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwvubN+KhRIwSCfnLQ2kXE9UvnkG1LJDV5jnF3SpOtHB3obMz5piic75ykosTrD1W+T5QGq X-Received: by 2002:a62:3a5b:: with SMTP id h88-v6mr52811496pfa.61.1534854349750; Tue, 21 Aug 2018 05:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534854349; cv=none; d=google.com; s=arc-20160816; b=LKByMPRJLhXRl7ESb+xHHTfOX/UxldPkXLlAXzn1src38i+2WpUjGsbGfrmHJgSTAW 6eTZ7pgJAmPXucQ/OIhD/s6QmJT/h5ayD6d4EslmVbCu9wWXf+1BZ7nR84G9IjPyB7ex U+u5IlsXV9CZsUxhEVHeneHVt63UcfH6RhXehQ2p3hpc4tB8dTUMzomnJk3zFwKNvv1/ oEqIFjHnvsi9DLmUaYpSBlY56WsT1s2PVnJWaf3Qh+gDBAzwsYJu64U6MG5hghvPFxH5 N/QbDxGlSxhxXnEotQc5XMte5Z05EK2BkgygcOoBWbr+53y4Usu6KvKTuLOxS10cjqN7 7Sxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :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=g0HBjFQuGn7ckGV0yFZH0BY91xXpx++rrABhudLErIs=; b=kotPOwXGg/Y/OfMnzUkQdwrLg2rFWUV0KpvK2lO0uj9Y1cp8aujLM+p+D0p+zje5Cf vq2/s9eZm1v7lMW++50fK3DMGv7poDf3easwBIWXBZw9HYY1HVbDZU4JdjH4uQ/yaAli sQFg22hH8/WR2hzrwN2Ep0X6ZXgbrxL5Gz6xDfI30ZiB/uNc7pXmvvgdK5HSwFByP32v +Za1xgOHVCPPS9oqS8gguOXGK2HDUB75dNAaNX+jXNk2fTa24c2hQscHpzOKphjicbri fdvux50KRkH1qhb4hulcmpn6YHESdYIlMQ4kvlDHWmwx4Ia05jdz4wuBWfZoAv6HigwG dJ5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cnexlabs.onmicrosoft.com header.s=selector1-cnexlabs-com header.b=lmKgl4Lx; 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 o73-v6si12629290pfk.356.2018.08.21.05.25.34; Tue, 21 Aug 2018 05:25:49 -0700 (PDT) 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=lmKgl4Lx; 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 S1727255AbeHUPQr (ORCPT + 99 others); Tue, 21 Aug 2018 11:16:47 -0400 Received: from mail-eopbgr690065.outbound.protection.outlook.com ([40.107.69.65]:17376 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727058AbeHUPQq (ORCPT ); Tue, 21 Aug 2018 11:16:46 -0400 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:X-MS-Exchange-SenderADCheck; bh=g0HBjFQuGn7ckGV0yFZH0BY91xXpx++rrABhudLErIs=; b=lmKgl4LxJO2d8YFp+433juZjKEey6RSW1qmXWoXXwk+1+0TAAkx0f/k/j4JVLMAqKiIyOWsrCUbI6/RgA1mgsVrf/yMTXrhRFTMFyDtKkvLOwuHQ0wlzX+9S08dSBnsNgAZjy30ASYB+FPYtqo1mS2W9XBVJO6Mj6r2nbdRqncc= Received: from BLUPR06MB529.namprd06.prod.outlook.com (10.141.204.140) by BLUPR06MB819.namprd06.prod.outlook.com (10.141.22.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.23; Tue, 21 Aug 2018 11:56:43 +0000 Received: from BLUPR06MB529.namprd06.prod.outlook.com ([fe80::c8db:492c:4715:a9a9]) by BLUPR06MB529.namprd06.prod.outlook.com ([fe80::c8db:492c:4715:a9a9%9]) with mapi id 15.20.1059.023; Tue, 21 Aug 2018 11:56:41 +0000 From: Javier Gonzalez To: =?utf-8?B?TWF0aWFzIEJqw7hybGluZw==?= CC: "javier@javigon.com" , "axboe@kernel.dk" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] lightnvm: pblk: refactor metadata paths Thread-Topic: [PATCH 1/2] lightnvm: pblk: refactor metadata paths Thread-Index: AQHUNhPLCt2AF0MLoU6tSicTHGUe5qTKHyCAgAAAxDQ= Date: Tue, 21 Aug 2018 11:56:41 +0000 Message-ID: <238046C8-A030-49AA-AC73-F1E03C748CB4@cnexlabs.com> References: <1534501150-11906-1-git-send-email-javier@cnexlabs.com> <1534501150-11906-2-git-send-email-javier@cnexlabs.com>,<1713254e-a1d7-a261-216a-b03c0fb57531@lightnvm.io> In-Reply-To: <1713254e-a1d7-a261-216a-b03c0fb57531@lightnvm.io> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=javier@cnexlabs.com; x-originating-ip: [212.27.22.162] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BLUPR06MB819;6:QIq9/EoBBIxd0i9cx852j7/K9MjvIEbfG/tbPsdKjBzTm1imWNNk+d+y4MbJkaIW1kirmfuIObU6A6cyUTbsp0hPtDAfzTyR+je7J6aGG0JEkh+wgMx8D3zBnPWGvtBNjZwIggkhov6qhTdk0YTg0xPzHIi0r52YbPfYirt5PCreR7yMmNc14SYe4AdChenMM1Ca64E1UGIppqliyPn4p0p9nGTC7hR65UxBfD1sigutguu4p1XkPGBi9e5FJDJ8cBcnMzr0cfnYfM1+Qw56HCvOelVU1LgNAaFRndDT98EqgxVOEo5qphHWh855t939Ya4AVXJod4B5KfseBIVVYsFX2kt6f1jfuB5Qy4HSX4JtWgZz5x+pZtab0Eo5YZ0b4AWg7C3V01f5IWYa9sIcD9C0KpKrx3x5r3c+A1zDVmQhpYNRpLFGu2faxe9GPvYGjBaUVvh8eLat2D9hB3c25A==;5:ZmuZSWeoI+ZXkjaAzTYlSM7UGT7L3JWbiRhRt8meCfc3WETHqOT19RG9beJag76DpGSBCKu7qePdpIicY4e4UqOT3Q5vwOjNn2NfuVwlnFuMfq8r+1DR2D95LMaVbvYchE9I8d7+WSVI7HfzclIlh0PfOqfgxerHO1Sy5nyBteg=;7:8rc7JyRrJXiVEw6W65enYfjyT//5UVht6rjuBYZX8EORTuI/lU4slOXegIV8wURLrbPZ7i+ENL+1kfpkWn/DdoLbdalywa4neQFRhVRB1YYYtfcbM2gn7TtKntpH3HrXk63K+Uy+UdxH5kSd3ZVL2kyJ4B0yjYEBZsGa4nTH3YWtR7Vduh8K/yfTUBsbkcNjBGTYE4DNpYGPJRoxQCmX6ZeHZXEillBQyRIQkMCyC6PutAClmCwhmyHJ8VWk/WZW x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 6cc7c843-3c73-4f3f-e1c8-08d6075d28be x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BLUPR06MB819; x-ms-traffictypediagnostic: BLUPR06MB819: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699016);SRVR:BLUPR06MB819;BCL:0;PCL:0;RULEID:;SRVR:BLUPR06MB819; x-forefront-prvs: 0771670921 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39840400004)(376002)(346002)(396003)(136003)(366004)(189003)(199004)(53946003)(229853002)(83716003)(486006)(7736002)(316002)(11346002)(82746002)(6486002)(476003)(2616005)(66066001)(8676002)(81166006)(81156014)(575784001)(53546011)(478600001)(6506007)(102836004)(14454004)(2906002)(446003)(99286004)(6436002)(53936002)(6512007)(186003)(305945005)(54906003)(76176011)(26005)(6116002)(86362001)(3846002)(33656002)(5660300001)(68736007)(6246003)(36756003)(8936002)(6916009)(5250100002)(105586002)(106356001)(25786009)(2900100001)(4326008)(14444005)(97736004)(256004);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR06MB819;H:BLUPR06MB529.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cnexlabs.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: gM5L8opDg536uY2vgo8uLhtjPcmqmbExpdtUa/bLty3LnqW+q0ZVEWL4/K4uZm8WvNp5CRKnig7VpLpmYgzwT+TDb8WCnv0T9paG2LliYzycRflNjo85H5L6seatGQETjGnGkyJkIxCKHIwAh170ecwibT1a1lPqj5bYsPg5XGhX/jvYnPiunEJcfAKbli74lXt8itHHe2SZowBNXhhfH+WrdzcdGpMu4zr9fSQ0pO9WoGWYi2R1qdh2xVYI+aGauadHho2E4U0YJdwNHwACM6cDJ3wdF8dw/dK6to1qFb/fF3d/CETCrXEbIBwjE3Asjp6TVNBwz0SbmKttQCObtgH2EID/PAC6ukJcJqLmbB8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: cnexlabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cc7c843-3c73-4f3f-e1c8-08d6075d28be X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Aug 2018 11:56:41.4580 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e40dfc2e-c6c1-463a-a598-38602b2c3cff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR06MB819 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gT24gMjEgQXVnIDIwMTgsIGF0IDEzLjU0LCBNYXRpYXMgQmrDuHJsaW5nIDxtYkBsaWdo dG52bS5pbz4gd3JvdGU6DQo+IA0KPj4gT24gMDgvMTcvMjAxOCAxMjoxOSBQTSwgSmF2aWVyIEdv bnrDoWxleiB3cm90ZToNCj4+IHBibGsgbWFpbnRhaW5zIHR3byBkaWZmZXJlbnQgbWV0YWRhdGEg cGF0aHMgZm9yIHNtZXRhIGFuZCBlbWV0YSwgd2hpY2gNCj4+IHN0b3JlIG1ldGFkYXRhIGF0IHRo ZSBzdGFydCBvZiB0aGUgbGluZSBhbmQgYXQgdGhlIGVuZCBvZiB0aGUgbGluZSwNCj4+IHJlc3Bl Y3RpdmVseS4gVW50aWwgbm93LCB0aGVzZSBwYXRoIGhhcyBiZWVuIGNvbW1vbiBmb3Igd3JpdGlu ZyBhbmQNCj4+IHJldHJpZXZpbmcgbWV0YWRhdGEsIGhvd2V2Z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ldGEgKm1ldGFfbGlzdCA9IHJxZC5tZXRhX2xpc3Q7DQo+PiAr ICAgIGZvciAoaSA9IDA7IGkgPCBycWQubnJfcHBhczsgKSB7DQo+PiArICAgICAgICBzdHJ1Y3Qg cHBhX2FkZHIgcHBhID0gYWRkcl90b19nZW5fcHBhKHBibGssIHBhZGRyLCBsaW5lX2lkKTsNCj4+ ICsgICAgICAgIGludCBwb3MgPSBwYmxrX3BwYV90b19wb3MoZ2VvLCBwcGEpOw0KPj4gIC0gICAg ICAgIHJxZC5pc19zZXEgPSAxOw0KPj4gLSAgICAgICAgZm9yIChpID0gMDsgaSA8IHJxZC5ucl9w cGFzOyApIHsNCj4+IC0gICAgICAgICAgICBzcGluX2xvY2soJmxpbmUtPmxvY2spOw0KPj4gLSAg ICAgICAgICAgIHBhZGRyID0gX19wYmxrX2FsbG9jX3BhZ2UocGJsaywgbGluZSwgbWluKTsNCj4+ IC0gICAgICAgICAgICBzcGluX3VubG9jaygmbGluZS0+bG9jayk7DQo+PiAtICAgICAgICAgICAg Zm9yIChqID0gMDsgaiA8IG1pbjsgaisrLCBpKyssIHBhZGRyKyspIHsNCj4+IC0gICAgICAgICAg ICAgICAgbWV0YV9saXN0W2ldLmxiYSA9IGNwdV90b19sZTY0KEFERFJfRU1QVFkpOw0KPj4gLSAg ICAgICAgICAgICAgICBycWQucHBhX2xpc3RbaV0gPQ0KPj4gLSAgICAgICAgICAgICAgICAgICAg YWRkcl90b19nZW5fcHBhKHBibGssIHBhZGRyLCBpZCk7DQo+PiAtICAgICAgICAgICAgfQ0KPj4g LSAgICAgICAgfQ0KPj4gLSAgICB9IGVsc2Ugew0KPj4gLSAgICAgICAgZm9yIChpID0gMDsgaSA8 IHJxZC5ucl9wcGFzOyApIHsNCj4+IC0gICAgICAgICAgICBzdHJ1Y3QgcHBhX2FkZHIgcHBhID0g YWRkcl90b19nZW5fcHBhKHBibGssIHBhZGRyLCBpZCk7DQo+PiAtICAgICAgICAgICAgaW50IHBv cyA9IHBibGtfcHBhX3RvX3BvcyhnZW8sIHBwYSk7DQo+PiArICAgICAgICBpZiAocGJsa19pb19h bGlnbmVkKHBibGssIHJxX3BwYXMpKQ0KPj4gKyAgICAgICAgICAgIHJxZC5pc19zZXEgPSAxOw0K Pj4gIC0gICAgICAgICAgICBpZiAocGJsa19pb19hbGlnbmVkKHBibGssIHJxX3BwYXMpKQ0KPj4g LSAgICAgICAgICAgICAgICBycWQuaXNfc2VxID0gMTsNCj4+IC0NCj4+IC0gICAgICAgICAgICB3 aGlsZSAodGVzdF9iaXQocG9zLCBsaW5lLT5ibGtfYml0bWFwKSkgew0KPj4gLSAgICAgICAgICAg ICAgICBwYWRkciArPSBtaW47DQo+PiAtICAgICAgICAgICAgICAgIGlmIChwYmxrX2JvdW5kYXJ5 X3BhZGRyX2NoZWNrcyhwYmxrLCBwYWRkcikpIHsNCj4+IC0gICAgICAgICAgICAgICAgICAgIHBi bGtfZXJyKHBibGssICJjb3JydXB0IGVtZXRhIGxpbmU6JWRcbiIsDQo+PiAtICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBsaW5lLT5pZCk7DQo+PiAtICAgICAgICAgICAgICAgICAgICBi aW9fcHV0KGJpbyk7DQo+PiAtICAgICAgICAgICAgICAgICAgICByZXQgPSAtRUlOVFI7DQo+PiAt ICAgICAgICAgICAgICAgICAgICBnb3RvIGZyZWVfcnFkX2RtYTsNCj4+IC0gICAgICAgICAgICAg ICAgfQ0KPj4gLQ0KPj4gLSAgICAgICAgICAgICAgICBwcGEgPSBhZGRyX3RvX2dlbl9wcGEocGJs aywgcGFkZHIsIGlkKTsNCj4+IC0gICAgICAgICAgICAgICAgcG9zID0gcGJsa19wcGFfdG9fcG9z KGdlbywgcHBhKTsNCj4+IC0gICAgICAgICAgICB9DQo+PiAtDQo+PiAtICAgICAgICAgICAgaWYg KHBibGtfYm91bmRhcnlfcGFkZHJfY2hlY2tzKHBibGssIHBhZGRyICsgbWluKSkgew0KPj4gLSAg ICAgICAgICAgICAgICBwYmxrX2VycihwYmxrLCAiY29ycnVwdCBlbWV0YSBsaW5lOiVkXG4iLA0K Pj4gLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZS0+aWQpOw0KPj4gKyAgICAg ICAgd2hpbGUgKHRlc3RfYml0KHBvcywgbGluZS0+YmxrX2JpdG1hcCkpIHsNCj4+ICsgICAgICAg ICAgICBwYWRkciArPSBtaW47DQo+PiArICAgICAgICAgICAgaWYgKHBibGtfYm91bmRhcnlfcGFk ZHJfY2hlY2tzKHBibGssIHBhZGRyKSkgew0KPj4gICAgICAgICAgICAgICAgICBiaW9fcHV0KGJp byk7DQo+PiAgICAgICAgICAgICAgICAgIHJldCA9IC1FSU5UUjsNCj4+ICAgICAgICAgICAgICAg ICAgZ290byBmcmVlX3JxZF9kbWE7DQo+PiAgICAgICAgICAgICAgfQ0KPj4gIC0gICAgICAgICAg ICBmb3IgKGogPSAwOyBqIDwgbWluOyBqKyssIGkrKywgcGFkZHIrKykNCj4+IC0gICAgICAgICAg ICAgICAgcnFkLnBwYV9saXN0W2ldID0NCj4+IC0gICAgICAgICAgICAgICAgICAgIGFkZHJfdG9f Z2VuX3BwYShwYmxrLCBwYWRkciwgbGluZS0+aWQpOw0KPj4gKyAgICAgICAgICAgIHBwYSA9IGFk ZHJfdG9fZ2VuX3BwYShwYmxrLCBwYWRkciwgbGluZV9pZCk7DQo+PiArICAgICAgICAgICAgcG9z ID0gcGJsa19wcGFfdG9fcG9zKGdlbywgcHBhKTsNCj4+ICAgICAgICAgIH0NCj4+ICsNCj4+ICsg ICAgICAgIGlmIChwYmxrX2JvdW5kYXJ5X3BhZGRyX2NoZWNrcyhwYmxrLCBwYWRkciArIG1pbikp IHsNCj4+ICsgICAgICAgICAgICBiaW9fcHV0KGJpbyk7DQo+PiArICAgICAgICAgICAgcmV0ID0g LUVJTlRSOw0KPj4gKyAgICAgICAgICAgIGdvdG8gZnJlZV9ycWRfZG1hOw0KPj4gKyAgICAgICAg fQ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