diff options
author | Marcin Dziegielewski <marcin.dziegielewski@intel.com> | 2019-05-04 21:37:57 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-05-06 19:19:18 +0300 |
commit | 4bbae699226ea72a91a665f489c0d85fb48885d1 (patch) | |
tree | 49bdb70fdbaa7e85b8a2bae69fef9a95b4692063 /drivers/lightnvm | |
parent | 0503871223b7316caa1d6a78b09c167ceb135dd1 (diff) |
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>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r-- | drivers/lightnvm/pblk-recovery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c index 83b467b5edc7..017874e03253 100644 --- a/drivers/lightnvm/pblk-recovery.c +++ b/drivers/lightnvm/pblk-recovery.c @@ -844,6 +844,7 @@ next: spin_unlock(&l_mg->free_lock); } else { spin_lock(&l_mg->free_lock); + l_mg->data_line = data_line; /* Allocate next line for preparation */ l_mg->data_next = pblk_line_get(pblk); if (l_mg->data_next) { |