diff options
author | Igor Konopko <igor.j.konopko@intel.com> | 2019-05-04 20:38:02 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-05-06 18:19:18 +0200 |
commit | d165a7a6f5aa05dfdfc164e24c11b6458a523ff7 (patch) | |
tree | a02eedc457fb198b506e305b1b28951a7234e2fe /drivers/lightnvm | |
parent | lightnvm: pblk: fix update line wp in OOB recovery (diff) | |
download | linux-d165a7a6f5aa05dfdfc164e24c11b6458a523ff7.tar.xz linux-d165a7a6f5aa05dfdfc164e24c11b6458a523ff7.zip |
lightnvm: pblk: propagate errors when reading meta
Read errors are not correctly propagated. Errors are cleared before
returning control to the io submitter. Change the behaviour such that
all read errors exept high ecc read warning status is returned
appropriately.
Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
Reviewed-by: Javier González <javier@javigon.com>
Reviewed-by: Hans Holmberg <hans.holmberg@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 | 9 | ||||
-rw-r--r-- | drivers/lightnvm/pblk-recovery.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 39280c1e9b5d..38e26fe23138 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -761,8 +761,10 @@ int pblk_line_smeta_read(struct pblk *pblk, struct pblk_line *line) atomic_dec(&pblk->inflight_io); - if (rqd.error) + if (rqd.error && rqd.error != NVM_RSP_WARN_HIGHECC) { pblk_log_read_err(pblk, &rqd); + ret = -EIO; + } clear_rqd: pblk_free_rqd_meta(pblk, &rqd); @@ -916,8 +918,11 @@ next_rq: atomic_dec(&pblk->inflight_io); - if (rqd.error) + if (rqd.error && rqd.error != NVM_RSP_WARN_HIGHECC) { pblk_log_read_err(pblk, &rqd); + ret = -EIO; + goto free_rqd_dma; + } emeta_buf += rq_len; left_ppas -= rq_ppas; diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c index 357e52980f2f..124d8179b2ad 100644 --- a/drivers/lightnvm/pblk-recovery.c +++ b/drivers/lightnvm/pblk-recovery.c @@ -458,7 +458,7 @@ retry_rq: atomic_dec(&pblk->inflight_io); /* If a read fails, do a best effort by padding the line and retrying */ - if (rqd->error) { + if (rqd->error && rqd->error != NVM_RSP_WARN_HIGHECC) { int pad_distance, ret; if (padded) { |