LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Javier Gonzalez <javier@cnexlabs.com>
To: Hans Holmberg <hans.ml.holmberg@owltronix.com>
Cc: "Matias Bjørling" <mb@lightnvm.io>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Hans Holmberg" <hans.holmberg@cnexlabs.com>
Subject: Re: [PATCH v2 3/3] lightnvm: pblk: fix smeta write error path
Date: Mon, 30 Apr 2018 09:19:25 +0000	[thread overview]
Message-ID: <E2E27D56-61CE-4882-8D78-1427CF70CE7A@cnexlabs.com> (raw)
In-Reply-To: <1524548732-4326-4-git-send-email-hans.ml.holmberg@owltronix.com>

[-- Attachment #1: Type: text/plain, Size: 1524 bytes --]

> On 24 Apr 2018, at 07.45, Hans Holmberg <hans.ml.holmberg@owltronix.com> wrote:
> 
> From: Hans Holmberg <hans.holmberg@cnexlabs.com>
> 
> Smeta write errors were previously ignored. Skip these
> lines instead and throw them back on the free
> list, so the chunks will go through a reset cycle
> before we attempt to use the line again.
> 
> Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
> ---
> drivers/lightnvm/pblk-core.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
> index 413cf3b..dec1bb4 100644
> --- a/drivers/lightnvm/pblk-core.c
> +++ b/drivers/lightnvm/pblk-core.c
> @@ -849,9 +849,10 @@ static int pblk_line_submit_smeta_io(struct pblk *pblk, struct pblk_line *line,
> 	atomic_dec(&pblk->inflight_io);
> 
> 	if (rqd.error) {
> -		if (dir == PBLK_WRITE)
> +		if (dir == PBLK_WRITE) {
> 			pblk_log_write_err(pblk, &rqd);
> -		else if (dir == PBLK_READ)
> +			ret = 1;
> +		} else if (dir == PBLK_READ)
> 			pblk_log_read_err(pblk, &rqd);
> 	}
> 
> @@ -1120,7 +1121,7 @@ static int pblk_line_init_bb(struct pblk *pblk, struct pblk_line *line,
> 
> 	if (init && pblk_line_submit_smeta_io(pblk, line, off, PBLK_WRITE)) {
> 		pr_debug("pblk: line smeta I/O failed. Retry\n");
> -		return 1;
> +		return 0;
> 	}
> 
> 	bitmap_copy(line->invalid_bitmap, line->map_bitmap, lm->sec_per_line);
> --
> 2.7.4

LGTM

Reviewed-by: Javier González <javier@cnexlabs.com>


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-04-30  9:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24  5:45 [PATCH v2 0/3] Rework write error handling in pblk Hans Holmberg
2018-04-24  5:45 ` [PATCH v2 1/3] lightnvm: pblk: rework write error recovery path Hans Holmberg
2018-04-30  9:13   ` Javier Gonzalez
2018-04-24  5:45 ` [PATCH v2 2/3] lightnvm: pblk: garbage collect lines with failed writes Hans Holmberg
2018-04-30  9:14   ` Javier Gonzalez
2018-04-30  9:19     ` Javier Gonzalez
2018-04-24  5:45 ` [PATCH v2 3/3] lightnvm: pblk: fix smeta write error path Hans Holmberg
2018-04-30  9:19   ` Javier Gonzalez [this message]
2018-04-28 19:31 ` [PATCH v2 0/3] Rework write error handling in pblk Matias Bjørling
2018-04-30  9:11   ` Javier Gonzalez
2018-05-07 13:05 ` Matias Bjørling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E2E27D56-61CE-4882-8D78-1427CF70CE7A@cnexlabs.com \
    --to=javier@cnexlabs.com \
    --cc=hans.holmberg@cnexlabs.com \
    --cc=hans.ml.holmberg@owltronix.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@lightnvm.io \
    --subject='Re: [PATCH v2 3/3] lightnvm: pblk: fix smeta write error path' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).