Currently when unknown error occurs on read path
there is only dmesg information about it, but it
is not counted in sysfs statistics. Since this is
still an error we should also count it there.

Signed-off-by: Igor Konopko <[email protected]>
---
 drivers/lightnvm/pblk-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index eabcbc119681..a98b2255f963 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -493,6 +493,7 @@ void pblk_log_read_err(struct pblk *pblk, struct nvm_rq 
*rqd)
                atomic_long_inc(&pblk->read_failed);
                break;
        default:
+               atomic_long_inc(&pblk->read_failed);
                pblk_err(pblk, "unknown read error:%d\n", rqd->error);
        }
 #ifdef CONFIG_NVM_PBLK_DEBUG
-- 
2.17.1

Reply via email to