diff options
author | Hans Holmberg <hans.holmberg@cnexlabs.com> | 2018-06-01 16:41:07 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-06-01 09:02:53 -0600 |
commit | 6cf17a2f838db707dc8a69fe96f3565f2f4f61e6 (patch) | |
tree | 78ef32a91c6d8a4c1723640c87c47dcca8118619 /drivers/lightnvm | |
parent | 48b8d20895f8a489e1527e9bdc5e372808542fa3 (diff) | |
download | linux-6cf17a2f838db707dc8a69fe96f3565f2f4f61e6.tar.gz linux-6cf17a2f838db707dc8a69fe96f3565f2f4f61e6.tar.bz2 linux-6cf17a2f838db707dc8a69fe96f3565f2f4f61e6.zip |
lightnvm: pblk: fix smeta write error path
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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r-- | drivers/lightnvm/pblk-core.c | 7 |
1 files 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); |