From patchwork Tue Aug 1 19:11:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Kani, Toshi" X-Patchwork-Id: 9875257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 68A65604DA for ; Tue, 1 Aug 2017 19:12:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AD9B286E0 for ; Tue, 1 Aug 2017 19:12:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 484C728736; Tue, 1 Aug 2017 19:12:53 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 2BE18286E1 for ; Tue, 1 Aug 2017 19:12:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbdHATMB (ORCPT ); Tue, 1 Aug 2017 15:12:01 -0400 Received: from g2t2354.austin.hpe.com ([15.233.44.27]:34177 "EHLO g2t2354.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752262AbdHATL6 (ORCPT ); Tue, 1 Aug 2017 15:11:58 -0400 Received: from G2W6311.americas.hpqcorp.net (g2w6311.austin.hp.com [16.197.64.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2354.austin.hpe.com (Postfix) with ESMTPS id EB81A6F; Tue, 1 Aug 2017 19:11:57 +0000 (UTC) Received: from G9W9209.americas.hpqcorp.net (16.220.66.156) by G2W6311.americas.hpqcorp.net (16.197.64.53) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 1 Aug 2017 19:11:55 +0000 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (15.241.52.10) by G9W9209.americas.hpqcorp.net (16.220.66.156) with Microsoft SMTP Server (TLS) id 15.0.1178.4 via Frontend Transport; Tue, 1 Aug 2017 19:11:55 +0000 Received: from DF4PR84MB0187.NAMPRD84.PROD.OUTLOOK.COM (10.162.193.141) by DF4PR84MB0185.NAMPRD84.PROD.OUTLOOK.COM (10.162.193.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Tue, 1 Aug 2017 19:11:53 +0000 Received: from DF4PR84MB0187.NAMPRD84.PROD.OUTLOOK.COM ([10.162.193.141]) by DF4PR84MB0187.NAMPRD84.PROD.OUTLOOK.COM ([10.162.193.141]) with mapi id 15.01.1304.023; Tue, 1 Aug 2017 19:11:53 +0000 From: "Kani, Toshimitsu" To: "linux-nvdimm@lists.01.org" , "vishal.l.verma@intel.com" CC: "dan.j.williams@intel.com" , "jmoyer@redhat.com" , "linux-acpi@vger.kernel.org" , "rafael.j.wysocki@intel.com" Subject: Re: [PATCH v4 0/6] BTT error clearing rework Thread-Topic: [PATCH v4 0/6] BTT error clearing rework Thread-Index: AQHTBmgxl1MvfxUxj0qa0iZAjrEz+qJullMAgAAIJgCAAQfXgIAAPkmA Date: Tue, 1 Aug 2017 19:11:53 +0000 Message-ID: <1501614143.2042.101.camel@hpe.com> References: <20170726233546.29052-1-vishal.l.verma@intel.com> <1501542358.2042.97.camel@hpe.com> <1501544000.4405.5.camel@intel.com> <1501600767.2042.99.camel@hpe.com> In-Reply-To: <1501600767.2042.99.camel@hpe.com> 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=toshi.kani@hpe.com; x-originating-ip: [15.203.227.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DF4PR84MB0185; 7:PAhIRDR9f+OuiPgCnX6ihCMJZisyaXQj+hp/fXIXek2XDqYmhdXFiLDp4G9A1wrB/kcRKxAVztuWvWOYxlyfWIpjH2DviZpmB8Qz7w/dnIujIuwa1I/wwrfrLjbOlEwviwi83/VW1E+hFksdybz2G226rYLCevkhMBA6WikuX1RL+7dzG/CNlrp54WMRUmeDUEZAOHdKUS+xWXNr05ZW7uV8rbJkabOQRkJYDUyYOMREMiTA3Rk/L2dbEtrSTVLpuFsUFpX+hR8/+Kj5qcpzOrKGRG0Dl8/LPHVNWWcqKLwPNWhW9l/BCWTmpzGhDLdXiBWuCU50essZKbw+OzgiiEHAJb6dzkT1WKBLtyxSJiLd4K5HdAft3ntcfzMKzV+I7FAMSUgFOvC44D4LAmLjf67r/fdoi0yYsHjIe9mS9lYY+wIqPEgRsLsZYcR+YVQ59LFD+7vXNI5IdusMhhKd0MXfF6R74EQqTrfjRm2op3HiIyuGMGxCNcHO0QO3+u8XVNRQFSfHDMnyirQEQ7zCMPqDTf+qm6cCmLdqQ61rwvkzzgs3EaW7y0ohO6w1u+gJzee1IeMZNmkvou3fYkfmroYI/80rtWbYbtma3RLIwDRqFouNuWAZcJRy/Oi3yFVbRbTjIoR1YR1w76nNfPwiL0rwf+zuJh3QIvxZwk7oszkmcxtEcZIojtbGwhQRiwtrBPmMsYe7FKSJeRd/6w0zXPDhEJLeHMCkOaGphPhQqNoUGLYbKRQ7ZMNC3zCu79Pb7wsBV5JmsGDyZLeLO3rv4/peGa4P8lJ1/CSJ/YvtK3I= x-ms-office365-filtering-correlation-id: 97b9da7e-9fc8-4343-a98b-08d4d9112ba8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DF4PR84MB0185; x-ms-traffictypediagnostic: DF4PR84MB0185: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123562025)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DF4PR84MB0185; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DF4PR84MB0185; x-forefront-prvs: 0386B406AA x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39840400002)(39850400002)(39450400003)(39860400002)(39410400002)(39400400002)(24454002)(51914003)(189002)(377424004)(199003)(106356001)(81166006)(81156014)(229853002)(4326008)(50986999)(101416001)(478600001)(6436002)(2900100001)(66066001)(25786009)(76176999)(54356999)(6512007)(189998001)(102836003)(54906002)(6116002)(3846002)(6246003)(38730400002)(86362001)(53936002)(36756003)(33646002)(6506006)(97736004)(103116003)(3280700002)(77096006)(6486002)(8936002)(7736002)(2501003)(3660700001)(93886004)(68736007)(305945005)(2950100002)(8676002)(105586002)(2906002)(14454004)(5660300001); DIR:OUT; SFP:1102; SCL:1; SRVR:DF4PR84MB0185; H:DF4PR84MB0187.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <661714EF8CE9E04998910473712B9FC4@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2017 19:11:53.4352 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0185 X-OriginatorOrg: hpe.com Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 2017-08-01 at 09:19 -0600, Toshi Kani wrote: > On Mon, 2017-07-31 at 23:35 +0000, Verma, Vishal L wrote: > > On Mon, 2017-07-31 at 23:15 +0000, Kani, Toshimitsu wrote: > > > On Wed, 2017-07-26 at 17:35 -0600, Vishal Verma wrote: : > > Thanks for the test Toshi, I will try and reproduce it. > > My first guess is - are the injected errors potentially in the BTT > > metadata area towards the end? > > > > ->rw_bytes can only clear errors on properly aligned writes, and > > the btt metadata writes will be too small to clear metadata > > errors.. > > I picked an injected offset without careful thoughts, so it is > possible that I might have stepped into such area.  I just tested > with a block device interface with multiple different offsets, and > they failed in clearing as well...  I will look into further as well > as my test setup. The change/hack below takes care of the issue in my setup. There is a discrepancy in offset between the pre-check in btt_write_pg() and the actual check in nsio_rw_bytes(). Thanks, -Toshi ---  drivers/nvdimm/btt.c |    2 +-  1 file changed, 1 insertion(+), 1 deletion(-)         return is_bad_pmem(btt->phys_bb, phys_sector, arena- >internal_lbasize);  } diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 8a959f8..83ad4c6 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1137,7 +1137,7 @@ static bool btt_is_badblock(struct btt *btt, struct arena_info *arena,                 u32 postmap)  {         u64 nsoff = to_namespace_offset(arena, postmap); -       sector_t phys_sector = nsoff >> 9; +       sector_t phys_sector = (nsoff + arena->nd_btt->initial_offset) >> 9;