lightnvm: pblk: rework write error recovery path
The write error recovery path is incomplete, so rework the write error recovery handling to do resubmits directly from the write buffer. When a write error occurs, the remaining sectors in the chunk are mapped out and invalidated and the request inserted in a resubmit list. The writer thread checks if there are any requests to resubmit, scans and invalidates any lbas that have been overwritten by later writes and resubmits the failed entries. Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com> Reviewed-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
72b6cdbb11
commit
6a3abf5bee
@@ -426,6 +426,7 @@ static int pblk_core_init(struct pblk *pblk)
|
||||
goto free_r_end_wq;
|
||||
|
||||
INIT_LIST_HEAD(&pblk->compl_list);
|
||||
INIT_LIST_HEAD(&pblk->resubmit_list);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1185,6 +1186,7 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk,
|
||||
pblk->state = PBLK_STATE_RUNNING;
|
||||
pblk->gc.gc_enabled = 0;
|
||||
|
||||
spin_lock_init(&pblk->resubmit_lock);
|
||||
spin_lock_init(&pblk->trans_lock);
|
||||
spin_lock_init(&pblk->lock);
|
||||
|
||||
|
Reference in New Issue
Block a user