From patchwork Mon May 28 08:58:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10430133 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 0C02660249 for ; Mon, 28 May 2018 09:02:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F019D28AD9 for ; Mon, 28 May 2018 09:02:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3D5B28BE1; Mon, 28 May 2018 09:02:52 +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,DKIM_SIGNED, DKIM_VALID, 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 68BB228AD9 for ; Mon, 28 May 2018 09:02:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754367AbeE1JCu (ORCPT ); Mon, 28 May 2018 05:02:50 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:54201 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754145AbeE1I7L (ORCPT ); Mon, 28 May 2018 04:59:11 -0400 Received: by mail-wm0-f67.google.com with SMTP id a67-v6so30048709wmf.3 for ; Mon, 28 May 2018 01:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qDmXstTMfIQQP99Q5c7ozm5OktWHKku9KXm3Y023+NA=; b=jEXTXDHo8JmOlR8HLeARQOzYTC2ChcLqRqJYVVz2CrDvoO/xfuaxizCn4MSrST9GWN jDQl8u9npF0lKkUb/ZwnpdS4Wv7jaCXsQq5bZcdPmWXrqv7gFeavZqG09krAkks0mXpd FQZtwTHA1xMj5qe8HE9qw8T0Q7GszGOgXgUAAP91DuR1iYXNvVNl6ZbdU/9K+d7BmuqP BawVeS2ivEKZCcuzKiGE9I9ECSI3dNsPOKTrqEKfTiLkELobBcPjenpa9wRGlxComjJh 3g4nF8DYDzQn9j4yG74EuAsDn6v5VoV0PuxiD9XOsjsELkVjXWTyflCL/ooxdgRsbSvf 3soQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qDmXstTMfIQQP99Q5c7ozm5OktWHKku9KXm3Y023+NA=; b=cqFuHZgDXwruQzfk9+KsucViaDAETfYwvf6yiGiIcMyZI713RUHsMZRBYWK98n/1p8 BSmKGhikK7j1cuib6SF7P17YV4RZ5a94t/lCLPO0EBoqDaPe1FTgICq9Gt7BDU3poar6 TfX3HFTPiGrXzOu783uW8WS0vP3V/Io0v0AtyRCUwtWTOf+5hFjOQHEOYcLeDOo5b1B1 6azAb5mhgYnzwOXzmgrOy0nvA9LRNCEdCKSG1c1r7mOwSNXibcN/tW+5sJ1gevVSy3nR 6amDxO6766yI5qyINwh15bpJyyUMRB0y3dsU0JbwkHiqUBFzBnkLHwGgfoA8BD4qDdVh ZnhA== X-Gm-Message-State: ALKqPwcS0PLNpDuE823WSuY7aNRLm/s5U9qbdSmHTfDh1ZdQ0KZWY8/a 5M6noMyV3Ka/l70U8egoK0Ewtg== X-Google-Smtp-Source: AB8JxZpx7cxjDzd63wGHe2ib/f1yzGcKu1x1PlngNbT5bcaKUPjHtVb7GFPfaUhdY4NCZaxAWm/uYg== X-Received: by 2002:a2e:8150:: with SMTP id t16-v6mr7914762ljg.32.1527497950244; Mon, 28 May 2018 01:59:10 -0700 (PDT) Received: from Macroninja.cnexlabs.com (95-166-82-66-cable.dk.customer.tdc.net. [95.166.82.66]) by smtp.gmail.com with ESMTPSA id u2-v6sm5777848lji.4.2018.05.28.01.59.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 01:59:09 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Igor Konopko , Marcin Dziegielewski , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 16/20] lightnvm: error handling when whole line is bad Date: Mon, 28 May 2018 10:58:37 +0200 Message-Id: <20180528085841.26684-17-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180528085841.26684-1-mb@lightnvm.io> References: <20180528085841.26684-1-mb@lightnvm.io> MIME-Version: 1.0 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 From: Igor Konopko When all the blocks (chunks) in line are marked as bad (offline) we shouldn't try to read smeta during init process. Currently we are trying to do so by passing -1 as PPA address, what causes multiple warnings, that we issuing IOs to out-of-bound PPAs. Signed-off-by: Igor Konopko Signed-off-by: Marcin Dziegielewski Updated title. Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index a20b41c355c5..e3e883547198 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -868,6 +868,11 @@ int pblk_line_read_smeta(struct pblk *pblk, struct pblk_line *line) { u64 bpaddr = pblk_line_smeta_start(pblk, line); + if (bpaddr == -1) { + /* Whole line is bad - do not try to read smeta. */ + return 1; + } + return pblk_line_submit_smeta_io(pblk, line, bpaddr, PBLK_READ_RECOV); }