lightnvm: pblk: handle bad sectors in the emeta area correctly
authorHans Holmberg <hans.holmberg@cnexlabs.com>
Thu, 29 Mar 2018 22:04:50 +0000 (00:04 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 29 Mar 2018 23:29:09 +0000 (17:29 -0600)
commitcfe1c9e2e2a34ccaf2ba01d2c435d65207335ca1
treecbcade11c13c78fdef2535b7f35e7cf09ed3621e
parent8f37d1913f096b530242f7815ac0be3c20888ef9
lightnvm: pblk: handle bad sectors in the emeta area correctly

Unless we check if there are bad sectors in the entire emeta-area
we risk ending up with valid bitmap / available sector count inconsistency.
This results in lines with a bad chunk at the last LUN marked as bad,
so go through the whole emeta area and mark up the invalid sectors.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-core.c