public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Matias Bjørling" <mb@lightnvm.io>
To: axboe@fb.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	javier@cnexlabs.com, igor.j.konopko@intel.com,
	marcin.dziegielewski@intel.com,
	"Hans Holmberg" <hans.holmberg@cnexlabs.com>,
	"Matias Bjørling" <mb@lightnvm.io>
Subject: [GIT PULL 03/10] lightnvm: pblk: fix smeta write error path
Date: Fri,  1 Jun 2018 16:41:07 +0200	[thread overview]
Message-ID: <20180601144114.17490-4-mb@lightnvm.io> (raw)
In-Reply-To: <20180601144114.17490-1-mb@lightnvm.io>

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>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
---
 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 e81a70cf9e9b..549341b24e3c 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);
 	}
 
@@ -1101,7 +1102,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.11.0

  parent reply	other threads:[~2018-06-01 14:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 14:41 [GIT PULL v3 00/10] lightnvm updates for 4.18 Matias Bjørling
2018-06-01 14:41 ` [GIT PULL 01/10] lightnvm: pblk: rework write error recovery path Matias Bjørling
2018-06-01 14:41 ` [GIT PULL 02/10] lightnvm: pblk: garbage collect lines with failed writes Matias Bjørling
2018-06-01 14:41 ` Matias Bjørling [this message]
2018-06-01 14:41 ` [GIT PULL 04/10] lightnvm: proper error handling for pblk_bio_add_pages Matias Bjørling
2018-06-01 14:41 ` [GIT PULL 05/10] lightnvm: fix partial read error path Matias Bjørling
2018-06-01 14:41 ` [GIT PULL 06/10] lightnvm: pblk: add possibility to set write buffer size manually Matias Bjørling
2018-06-01 14:41 ` [GIT PULL 07/10] lightnvm: pblk: remove unnecessary bio_get/put Matias Bjørling
2018-06-01 14:41 ` [GIT PULL 08/10] lightnvm: pblk: only try to recover lines with written smeta Matias Bjørling
2018-06-01 14:41 ` [GIT PULL 09/10] lightnvm: pblk: kick writer on new flush points Matias Bjørling
2018-06-01 14:41 ` [GIT PULL 10/10] lightnvm: pblk: take bitmap alloc. out of critical section Matias Bjørling
2018-06-01 15:03 ` [GIT PULL v3 00/10] lightnvm updates for 4.18 Jens Axboe

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=20180601144114.17490-4-mb@lightnvm.io \
    --to=mb@lightnvm.io \
    --cc=axboe@fb.com \
    --cc=hans.holmberg@cnexlabs.com \
    --cc=igor.j.konopko@intel.com \
    --cc=javier@cnexlabs.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.dziegielewski@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox