[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C161E678-ADEE-4E05-AC19-B54358005532@cnexlabs.com>
Date: Mon, 28 May 2018 10:59:03 +0000
From: Javier Gonzalez <javier@...xlabs.com>
To: Matias Bjørling <mb@...htnvm.io>
CC: Jens Axboe <axboe@...com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
"Konopko, Igor J" <igor.j.konopko@...el.com>,
Marcin Dziegielewski <marcin.dziegielewski@...el.com>
Subject: Re: [GIT PULL 16/20] lightnvm: error handling when whole line is bad
> On 28 May 2018, at 10.58, Matias Bjørling <mb@...htnvm.io> wrote:
>
> From: Igor Konopko <igor.j.konopko@...el.com>
>
> When all the blocks (chunks) in line are marked as bad (offline)
> we shouldn't try to read smeta during init process.
>
> Currently we are trying to do so by passing -1 as PPA address,
> what causes multiple warnings, that we issuing IOs to out-of-bound
> PPAs.
>
> Signed-off-by: Igor Konopko <igor.j.konopko@...el.com>
> Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@...el.com>
> Updated title.
> Signed-off-by: Matias Bjørling <mb@...htnvm.io>
> ---
> drivers/lightnvm/pblk-core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
> index a20b41c355c5..e3e883547198 100644
> --- a/drivers/lightnvm/pblk-core.c
> +++ b/drivers/lightnvm/pblk-core.c
> @@ -868,6 +868,11 @@ int pblk_line_read_smeta(struct pblk *pblk, struct pblk_line *line)
> {
> u64 bpaddr = pblk_line_smeta_start(pblk, line);
>
> + if (bpaddr == -1) {
> + /* Whole line is bad - do not try to read smeta. */
> + return 1;
> + }
This case cannot occur on the only user of the function
(pblk_recov_l2p()). On the previous check (pblk_line_was_written()), we
verify the state of the line and the position of the first good chunk. In
the case of a bad line (less chunks than a given threshold to allow
emeta), the recovery will not be carried out in the line.
Javier
Powered by blists - more mailing lists