Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754226AbdDNRE3 (ORCPT ); Fri, 14 Apr 2017 13:04:29 -0400 Received: from mga04.intel.com ([192.55.52.120]:51979 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753284AbdDNRE0 (ORCPT ); Fri, 14 Apr 2017 13:04:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,199,1488873600"; d="scan'208";a="248997687" Subject: [PATCH 1/5] Revert "libnvdimm: band aid btt vs clear poison locking" From: Dan Williams To: linux-nvdimm@ml01.01.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, vishal.l.verma@intel.com Date: Fri, 14 Apr 2017 09:58:16 -0700 Message-ID: <149218909642.3926.2657031890982247617.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <149218909065.3926.1234846095650907678.stgit@dwillia2-desk3.amr.corp.intel.com> References: <149218909065.3926.1234846095650907678.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1259 Lines: 33 This reverts commit 4aa5615e080a "libnvdimm: band aid btt vs clear poison locking". Now that poison list locking has been converted to a spinlock and poison list entry allocation during i/o has been converted to GFP_NOWAIT, revert the band-aid that disabled error clearing from btt i/o. Signed-off-by: Dan Williams --- drivers/nvdimm/claim.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c index ca6d572c48fc..b3323c0697f6 100644 --- a/drivers/nvdimm/claim.c +++ b/drivers/nvdimm/claim.c @@ -243,15 +243,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns, } if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) { - /* - * FIXME: nsio_rw_bytes() may be called from atomic - * context in the btt case and nvdimm_clear_poison() - * takes a sleeping lock. Until the locking can be - * reworked this capability requires that the namespace - * is not claimed by btt. - */ - if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512) - && (!ndns->claim || !is_nd_btt(ndns->claim))) { + if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512)) { long cleared; cleared = nvdimm_clear_poison(&ndns->dev, offset, size);