lightnvm: pblk: wait for inflight IOs in recovery
authorIgor Konopko <igor.j.konopko@intel.com>
Sat, 4 May 2019 18:38:03 +0000 (20:38 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 May 2019 16:19:18 +0000 (10:19 -0600)
commit1fc3b30569bc1087dc8c8b8eff27ca7727b807c4
tree5fd5d77ce820e85d6e94920502fdcf87b651676b
parentd165a7a6f5aa05dfdfc164e24c11b6458a523ff7
lightnvm: pblk: wait for inflight IOs in recovery

This patch changes the behaviour of recovery padding in order to
support a case, when some IOs were already submitted to the drive and
some next one are not submitted due to error returned.

Currently in case of errors we simply exit the pad function without
waiting for inflight IOs, which leads to panic on inflight IOs
completion.

After the changes we always wait for all the inflight IOs before
exiting the function.

Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-recovery.c