From patchwork Fri Jan 5 13:16:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 10146493 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 F11E560244 for ; Fri, 5 Jan 2018 13:18:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06AB1FFEB for ; Fri, 5 Jan 2018 13:18:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D47D5288BA; Fri, 5 Jan 2018 13:18:47 +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.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 739421FFEB for ; Fri, 5 Jan 2018 13:18:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751819AbeAENSp (ORCPT ); Fri, 5 Jan 2018 08:18:45 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:43595 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbeAENRB (ORCPT ); Fri, 5 Jan 2018 08:17:01 -0500 Received: by mail-wm0-f65.google.com with SMTP id n138so2399823wmg.2 for ; Fri, 05 Jan 2018 05:17:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hUrFhXCV8ERFmQJy7v3b3uCyeBHFuRSNvYc/eo2lEPA=; b=fPKn71jAeNa4BVcZKojkBPDU1JP120lZGuYMAOld92yfMoFL7t+beoE5py0Q7jmRvf NsU+QHA+GdQENniKiKkX+kHI0a8WYs1qLeamRu/SDtSCgptl5iZvNgzj4OYGA+q1j8mo XRyfir3RHcQGPyG391JAPQpBhgcp+G+LDEw9A= 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=hUrFhXCV8ERFmQJy7v3b3uCyeBHFuRSNvYc/eo2lEPA=; b=JmfW4giocrsBe9xAfqj8zJlwZl2tXyWSF1zbbGgiUkP0VCo1p52R8pJPsBkFCGSr68 hqG0TxU0wry7tiAEvVMg1VRbmlEZZiLf38GGcAeFvv64H2pGYpjTtjdElu/o4OrBqTK0 ejtV/eUa3agUDYGHNYorvABQhXzXwpkYjLkmMF3F64zSIwGrpeo0P+IPlxr3/uENB9iz BHtzlA/V3XLhOudovi3oB3txCajVgUsx2HWe2IQv0KjgFS+8aHy+xUgNvv1zEwgtmuAK FG3D4O/F+wgqkKHaEqbSqfgidfTdPAA31JkGi3YNwQdM1nb1fq3Yp/ZQ3/6Hpi5fuoej 7OvA== X-Gm-Message-State: AKGB3mKtWPKxrigQjvt+I1FP+Xkn/3QjgNy1VNb7flCCE6QTGXNP4GlA ETnLbFv9oKqFBVgPs9iyHjPFxA== X-Google-Smtp-Source: ACJfBov1yQiJweHtHmtwBGQX9j0ZTsj0LjVMw2XYT9SkiFBOZjJ1R9Op06EozzLsR0KwTddEsogp8w== X-Received: by 10.80.212.218 with SMTP id e26mr4035217edj.99.1515158220445; Fri, 05 Jan 2018 05:17:00 -0800 (PST) Received: from skyninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id e46sm4228940edb.93.2018.01.05.05.16.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 05:16:59 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 20/25] lightnvm: pblk: do not log recovery read errors Date: Fri, 5 Jan 2018 14:16:16 +0100 Message-Id: <20180105131621.20808-21-m@bjorling.me> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180105131621.20808-1-m@bjorling.me> References: <20180105131621.20808-1-m@bjorling.me> 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: Javier González On scan recovery, reads can fail. This happens because the first page for each line is read in order to determined if the line has been used (and thus needs to be recovered), or not. This can lead to "empty page" read errors. Since these errors are normal, do not log them, as they are confusing when reviewing the logs. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 6 +++--- drivers/lightnvm/pblk.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 5ec7ad6..0487b93 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -742,7 +742,7 @@ static int pblk_line_submit_smeta_io(struct pblk *pblk, struct pblk_line *line, cmd_op = NVM_OP_PWRITE; flags = pblk_set_progr_mode(pblk, PBLK_WRITE); lba_list = emeta_to_lbas(pblk, line->emeta->buf); - } else if (dir == PBLK_READ) { + } else if (dir == PBLK_READ_RECOV || dir == PBLK_READ) { bio_op = REQ_OP_READ; cmd_op = NVM_OP_PREAD; flags = pblk_set_read_mode(pblk, PBLK_READ_SEQUENTIAL); @@ -802,7 +802,7 @@ static int pblk_line_submit_smeta_io(struct pblk *pblk, struct pblk_line *line, if (rqd.error) { if (dir == PBLK_WRITE) pblk_log_write_err(pblk, &rqd); - else + else if (dir == PBLK_READ) pblk_log_read_err(pblk, &rqd); } @@ -816,7 +816,7 @@ int pblk_line_read_smeta(struct pblk *pblk, struct pblk_line *line) { u64 bpaddr = pblk_line_smeta_start(pblk, line); - return pblk_line_submit_smeta_io(pblk, line, bpaddr, PBLK_READ); + return pblk_line_submit_smeta_io(pblk, line, bpaddr, PBLK_READ_RECOV); } int pblk_line_read_emeta(struct pblk *pblk, struct pblk_line *line, diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h index 19e622c..93ec4fd 100644 --- a/drivers/lightnvm/pblk.h +++ b/drivers/lightnvm/pblk.h @@ -60,6 +60,7 @@ enum { PBLK_READ = READ, PBLK_WRITE = WRITE,/* Write from write buffer */ PBLK_WRITE_INT, /* Internal write - no write buffer */ + PBLK_READ_RECOV, /* Recovery read - errors allowed */ PBLK_ERASE, };