mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Reviewed-by: Javier González <[email protected]> Reviewed-by: Hans Holmberg <[email protected]> Signed-off-by: Matias Bjørling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
2b0ae81e2a
commit
d165a7a6f5
2 changed files with 8 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue