From patchwork Wed Dec 30 21:13:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 7934731 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DED0BBEEED for ; Wed, 30 Dec 2015 21:13:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 014D12025A for ; Wed, 30 Dec 2015 21:13:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9264202EB for ; Wed, 30 Dec 2015 21:13:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755127AbbL3VNp (ORCPT ); Wed, 30 Dec 2015 16:13:45 -0500 Received: from mga14.intel.com ([192.55.52.115]:44311 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754794AbbL3VNm convert rfc822-to-8bit (ORCPT ); Wed, 30 Dec 2015 16:13:42 -0500 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 30 Dec 2015 13:13:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,502,1444719600"; d="scan'208";a="717718267" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 30 Dec 2015 13:13:41 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 30 Dec 2015 13:13:40 -0800 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.221]) by fmsmsx118.amr.corp.intel.com ([10.18.116.18]) with mapi id 14.03.0248.002; Wed, 30 Dec 2015 13:13:40 -0800 From: "Verma, Vishal L" To: "Verma, Vishal L" , "linux-nvdimm@lists.01.org" CC: "linux-acpi@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "Williams, Dan J" , Ross Zwisler , Jeff Moyer , "Linda Knippers" Subject: Re: [PATCH v2 0/2] Expose known poison in SPA ranges to the block layer Thread-Topic: [PATCH v2 0/2] Expose known poison in SPA ranges to the block layer Thread-Index: AQHRPrsFqVClAcMcCUifSmY87l/NY57kITWA Importance: high X-Priority: 1 Date: Wed, 30 Dec 2015 21:13:40 +0000 Message-ID: References: <1451010103-11462-1-git-send-email-vishal.l.verma@intel.com> In-Reply-To: <1451010103-11462-1-git-send-email-vishal.l.verma@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.9.151119 x-originating-ip: [10.255.35.21] Content-ID: MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 12/24/15, 19:21, "Verma, Vishal L" wrote: >v2: > - Move poison list walking from pmem to core (Dan) > - If the pmem namespace starts at an offset, account for that (Dan) > - Fix a bug in extended status checking for ars_status > - Remove a duplicate include in pmem.c (only introduced in v1) > - When doing an ars_status, don't error out if an ARS has not yet > been performed. > - When checking if ARS is supported, also check the extended status > and make sure ARS for persistent memory is supported (as opposed to > just volatile memory) > - Print a dev_err message if find_poison fails > - Collapse patches 2 and 3 into a single patch > >This series does a few things: >- Retrieve all known poison in the system physical address (SPA) space > using ARS (Address Range Scrub) commands to firmware >- Store this poison in a new 'nd_poison' structure >- In pmem, consume the poison list and expose the ranges as bad sectors > >This depends on the badblocks series sent out previously. >A tree with the latest revisions of both the badblocks patchset and this >can be found at: >https://git.kernel.org/cgit/linux/kernel/git/vishal/nvdimm.git/log/?h=err_ >handling_latest > > >Vishal Verma (2): > nfit_test: Enable DSMs for all test NFITs > libnvdimm: Add a poison list and export badblocks > > drivers/acpi/nfit.c | 203 >+++++++++++++++++++++++++++++++++++++++ > drivers/nvdimm/core.c | 187 >++++++++++++++++++++++++++++++++++++ > drivers/nvdimm/nd-core.h | 3 + > drivers/nvdimm/nd.h | 6 ++ > drivers/nvdimm/pmem.c | 6 ++ > include/linux/libnvdimm.h | 1 + > tools/testing/nvdimm/test/nfit.c | 9 ++ > 7 files changed, 415 insertions(+) > >-- >2.5.0 > > Dan reported that these patches fail the nfit_test unit tests, and it turns out that I had missed setting the ars_status 'address' and 'length' fields in these patches, causing the nfit driver to fail initialization. I didn't catch this in my testing as I have a patch to nfit test to add error records in the ars_status reply for testing, and that does this correctly. The following patch (can be squashed into patch 1, or be left by itself as a new patch 2) fixes this: I've also updated the tree at: https://git.kernel.org/cgit/linux/kernel/git/vishal/nvdimm.git/log/?h=err_h andling_latest 8<----- From e46d46f5da9913da180da6553bf744fe6a7d9ecb Mon Sep 17 00:00:00 2001 From: Vishal Verma Date: Wed, 30 Dec 2015 13:49:55 -0700 Subject: [PATCH] nfit_test: fix ars_status replies from nfit_test ars_status needs to reply with a valid address and length if the test module advertises ARS as supported. Without these fields populated, the nfit driver would fail initialization. Reported-by: Dan Williams Signed-off-by: Vishal Verma --- tools/testing/nvdimm/test/nfit.c | 2 ++ 1 file changed, 2 insertions(+) return 0; diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c index 298805a..90bd2ea 100644 --- a/tools/testing/nvdimm/test/nfit.c +++ b/tools/testing/nvdimm/test/nfit.c @@ -248,6 +248,8 @@ static int nfit_test_cmd_ars_status(struct nd_cmd_ars_status *nd_cmd, nd_cmd->out_length = 256; nd_cmd->num_records = 0; + nd_cmd->address = 0; + nd_cmd->length = -1ULL; nd_cmd->status = 0;