lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <F526444E-C13D-439A-BC00-34D7A3F6C8FF@lightnvm.io>
Date:   Fri, 22 Sep 2017 10:55:34 +0200
From:   Javier González <jg@...htnvm.io>
To:     Rakesh Pandit <rakesh@...era.com>
Cc:     Matias Bjørling <mb@...htnvm.io>,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] lightnvm: pblk: improve error message if down_timeout
 fails

> On 21 Sep 2017, at 13.27, Rakesh Pandit <rakesh@...era.com> wrote:
> 
> The two pr_err messages are useless as they don't even differentiate
> error code.
> 
> Signed-off-by: Rakesh Pandit <rakesh@...era.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@...xlabs.com>


Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ