mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
lightnvm: pblk: set propper line as data_line after gc
In current implementation of l2p recovery, when we are after gc and we have open line, we are not setting current data line properly (we set last line from the device instead of last line ordered by seq_nr) and in consequence, kernel panic and data corruption. Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com> Reviewed-by: Javier González <javier@javigon.com> Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
0503871223
commit
4bbae69922
1 changed files with 1 additions and 0 deletions
|
@ -844,6 +844,7 @@ struct pblk_line *pblk_recov_l2p(struct pblk *pblk)
|
||||||
spin_unlock(&l_mg->free_lock);
|
spin_unlock(&l_mg->free_lock);
|
||||||
} else {
|
} else {
|
||||||
spin_lock(&l_mg->free_lock);
|
spin_lock(&l_mg->free_lock);
|
||||||
|
l_mg->data_line = data_line;
|
||||||
/* Allocate next line for preparation */
|
/* Allocate next line for preparation */
|
||||||
l_mg->data_next = pblk_line_get(pblk);
|
l_mg->data_next = pblk_line_get(pblk);
|
||||||
if (l_mg->data_next) {
|
if (l_mg->data_next) {
|
||||||
|
|
Loading…
Reference in a new issue