Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934357AbdIYKPR (ORCPT ); Mon, 25 Sep 2017 06:15:17 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:45950 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933814AbdIYKPO (ORCPT ); Mon, 25 Sep 2017 06:15:14 -0400 X-Google-Smtp-Source: AOwi7QCvIGVKtUKKn6QKwRZp/lBPUhPRL0eDhygR4eBvg1hopg+2No9KjOHEPbU4LfEfENaYaqpj/Q== Subject: Re: [PATCH 4/6] lightnvm: pblk: improve error message if down_timeout fails To: =?UTF-8?Q?Javier_Gonz=c3=a1lez?= , Rakesh Pandit Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170921112729.GA28553@dhcp-216.srv.tuxera.com> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <55dfff8b-6e74-89bb-7c3f-1286cb4ea914@lightnvm.io> Date: Mon, 25 Sep 2017 12:15:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1276 Lines: 43 On 09/22/2017 10:55 AM, Javier González wrote: >> On 21 Sep 2017, at 13.27, Rakesh Pandit wrote: >> >> The two pr_err messages are useless as they don't even differentiate >> error code. >> >> Signed-off-by: Rakesh Pandit >> --- >> 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 b92eabc..74ddb30 100644 >> --- a/drivers/lightnvm/pblk-core.c >> +++ b/drivers/lightnvm/pblk-core.c >> @@ -1734,16 +1734,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) >> -- >> 2.5.0 > > Looks good. > > > Reviewed-by: Javier González > Thanks, I picked it up.