From patchwork Fri Oct 13 12:45:58 2017 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: 10004665 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 2225360360 for ; Fri, 13 Oct 2017 13:02:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1490329029 for ; Fri, 13 Oct 2017 13:02:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0951A29060; Fri, 13 Oct 2017 13:02:23 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable 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 8789029029 for ; Fri, 13 Oct 2017 13:02:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758305AbdJMNCL (ORCPT ); Fri, 13 Oct 2017 09:02:11 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:57232 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758088AbdJMMrQ (ORCPT ); Fri, 13 Oct 2017 08:47:16 -0400 Received: by mail-wm0-f68.google.com with SMTP id l68so21509010wmd.5 for ; Fri, 13 Oct 2017 05:47:15 -0700 (PDT) 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=YB+KEPrFTN65pRnp+Tb9RbI0QClqJrq+8licZiwV1Fk=; b=nGosG2xg9S3Mpo9uWe7l4To86Uc2LWjP1U2lNgpoxaLED3py44lukgLgRn7v0axNxs xMjHu1UvLnO1WOLpzcvHQOiBcRuUZ/fltkV7Osdcv9Z1uIAcytz/lJb9qxliqai9X6Fx avUk+YBgrkB3jLEA+GMSZdrFbibQ6J8hhXXDk= 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=YB+KEPrFTN65pRnp+Tb9RbI0QClqJrq+8licZiwV1Fk=; b=dbYeSi+lzHY7wFtQrtTU47OrlZjVBk06zccfIQB2IDeSqb+ikdRCdoWdL4GVu2nbJ/ 4dkxjsE5kCqgk7/1PSIQCtL1v2A2rScU796KFXzoEpULM2+I+E474mW3rQigS3qM02qU BjuPL9cind6Eq6bIhSTzZT5NWDT0BXZkFzDMnNFiHrsgKFVAfmcrbGKGxbddbX00WK+M 47f7Upt/jmXGXE6QnPoeUjIE8UMxe3qC8/1Rm0tdO97zgbp7Rt4iaG/1f0Vvhpq9cV31 zv6pV2jn6y+5ymk6Yxwuzgjgx8RvU70curoK1liStIvggyq/9b1xPaIZp5xDBt+xirz4 n5EQ== X-Gm-Message-State: AMCzsaW8mr8SO21ExexaSn5oiq/xhQHuCBXHykRzsL2qhEEuLXgZHJE4 f/hssCFPNluT7IyUvitDmTkAmA== X-Google-Smtp-Source: AOwi7QBpKtNVI9H58KdKLIGlfadpgErDS+HNyyr0c9L7a5nm7nbblTcYlxByqpe/dXjsuo+VaDMwEQ== X-Received: by 10.80.151.211 with SMTP id f19mr2010325edb.141.1507898835195; Fri, 13 Oct 2017 05:47:15 -0700 (PDT) Received: from skyninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id p91sm735012edp.69.2017.10.13.05.47.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Oct 2017 05:47:14 -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, Rakesh Pandit , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 09/58] lightnvm: pblk: improve error message if down_timeout fails Date: Fri, 13 Oct 2017 14:45:58 +0200 Message-Id: <20171013124647.32668-10-m@bjorling.me> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171013124647.32668-1-m@bjorling.me> References: <20171013124647.32668-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: Rakesh Pandit The two pr_err messages are useless as they don't differentiate error code. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index b53bb00..027c42b 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -1691,16 +1691,8 @@ static void __pblk_down_page(struct pblk *pblk, struct ppa_addr *ppa_list, #endif ret = down_timeout(&rlun->wr_sem, msecs_to_jiffies(30000)); - if (ret) { - switch (ret) { - case -ETIME: - pr_err("pblk: lun semaphore timed out\n"); - break; - case -EINTR: - pr_err("pblk: lun semaphore timed out\n"); - break; - } - } + if (ret == -ETIME || ret == -EINTR) + pr_err("pblk: taking lun semaphore timed out: err %d\n", -ret); } void pblk_down_page(struct pblk *pblk, struct ppa_addr *ppa_list, int nr_ppas)