Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1737290
| From | Javier González <jg@lightnvm.io> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/6] lightnvm: pblk: improve error message if down_timeout fails |
| Date | 2017-09-22 11:00 +0200 |
| Message-ID | <usrYt-3Z9-1@gated-at.bofh.it> (permalink) |
| References | <us7Q8-kv-53@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
> On 21 Sep 2017, at 13.27, Rakesh Pandit <rakesh@tuxera.com> wrote:
>
> The two pr_err messages are useless as they don't even differentiate
> error code.
>
> Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
> ---
> 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 <javier@cnexlabs.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4/6] lightnvm: pblk: improve error message if down_timeout fails Rakesh Pandit <rakesh@tuxera.com> - 2017-09-21 13:30 +0200
Re: [PATCH 4/6] lightnvm: pblk: improve error message if down_timeout fails Javier González <jg@lightnvm.io> - 2017-09-22 11:00 +0200
Re: [PATCH 4/6] lightnvm: pblk: improve error message if down_timeout fails Matias Bjørling <mb@lightnvm.io> - 2017-09-25 12:20 +0200
csiph-web