From patchwork Fri Mar 22 14:48:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Konopko X-Patchwork-Id: 10865993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C15A613B5 for ; Fri, 22 Mar 2019 14:52:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA02829321 for ; Fri, 22 Mar 2019 14:52:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DE932A13F; Fri, 22 Mar 2019 14:52:51 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham 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 304322A869 for ; Fri, 22 Mar 2019 14:52:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729099AbfCVOwu (ORCPT ); Fri, 22 Mar 2019 10:52:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:5341 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728882AbfCVOwu (ORCPT ); Fri, 22 Mar 2019 10:52:50 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2019 07:52:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="216593452" Received: from gklab-107-059.igk.intel.com ([10.102.107.59]) by orsmga001.jf.intel.com with ESMTP; 22 Mar 2019 07:52:46 -0700 From: Igor Konopko To: mb@lightnvm.io, javier@javigon.com, hans.holmberg@cnexlabs.com Cc: linux-block@vger.kernel.org, igor.j.konopko@intel.com Subject: [PATCH v2 12/16] lightnvm: pblk: do not read OOB from emeta region Date: Fri, 22 Mar 2019 15:48:39 +0100 Message-Id: <20190322144843.9602-13-igor.j.konopko@intel.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20190322144843.9602-1-igor.j.konopko@intel.com> References: <20190322144843.9602-1-igor.j.konopko@intel.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Emeta does not have corresponding OOB metadata mapping valid, so there is no need to try to recover L2P mapping from it. Signed-off-by: Igor Konopko --- drivers/lightnvm/pblk-recovery.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c index 4e8f382..74e5b17 100644 --- a/drivers/lightnvm/pblk-recovery.c +++ b/drivers/lightnvm/pblk-recovery.c @@ -479,6 +479,15 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line, goto retry_rq; } + if (paddr >= line->emeta_ssec) { + /* + * We reach emeta region and we don't want + * to recover oob from emeta region. + */ + bio_put(bio); + goto completed; + } + pblk_get_packed_meta(pblk, rqd); bio_put(bio); @@ -499,6 +508,7 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line, if (left_ppas > 0) goto next_rq; +completed: #ifdef CONFIG_NVM_PBLK_DEBUG WARN_ON(padded && !pblk_line_is_full(line)); #endif