lightnvm: pblk: warn in case of corrupted write buffer
authorJavier González <javier@cnexlabs.com>
Fri, 1 Jun 2018 13:04:19 +0000 (15:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:25 +0000 (07:50 +0200)
commit4f5fd8a1ae16ccbb851bc2ca9243319c67f04955
tree1c7ac10a9571bbf8b13696fcb0dbb40eaa9146ab
parent929e1a3906e15ca66f2e750a6000ecc30e390edd
lightnvm: pblk: warn in case of corrupted write buffer

[ Upstream commit e37d07983af9068de0303054542d2652ca917f58 ]

When cleaning up buffer entries as we wrap up, their state should be
"completed". If any of the entries is in "submitted" state, it means
that something bad has happened. Trigger a warning immediately instead of
waiting for the state flag to eventually be updated, thus hiding the
issue.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/lightnvm/pblk-rb.c