* [PATCH] lightnvm: pblk: set propper line as data_line after gc
@ 2019-03-18 15:27 Marcin Dziegielewski
2019-03-18 19:12 ` Javier González
2019-03-25 10:54 ` Matias Bjørling
0 siblings, 2 replies; 3+ messages in thread
From: Marcin Dziegielewski @ 2019-03-18 15:27 UTC (permalink / raw)
To: mb, javier, hans.holmberg
Cc: linux-block, marcin.dziegielewski, igor.j.konopko
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. This patch fixes that issue.
Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
---
drivers/lightnvm/pblk-recovery.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
index 83b467b..017874e 100644
--- a/drivers/lightnvm/pblk-recovery.c
+++ b/drivers/lightnvm/pblk-recovery.c
@@ -844,6 +844,7 @@ struct pblk_line *pblk_recov_l2p(struct pblk *pblk)
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) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lightnvm: pblk: set propper line as data_line after gc
2019-03-18 15:27 [PATCH] lightnvm: pblk: set propper line as data_line after gc Marcin Dziegielewski
@ 2019-03-18 19:12 ` Javier González
2019-03-25 10:54 ` Matias Bjørling
1 sibling, 0 replies; 3+ messages in thread
From: Javier González @ 2019-03-18 19:12 UTC (permalink / raw)
To: Marcin Dziegielewski
Cc: Matias Bjørling, Hans Holmberg, linux-block, Konopko, Igor J
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
> On 18 Mar 2019, at 16.27, Marcin Dziegielewski <marcin.dziegielewski@intel.com> wrote:
>
> 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. This patch fixes that issue.
>
> Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
> ---
> drivers/lightnvm/pblk-recovery.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
> index 83b467b..017874e 100644
> --- a/drivers/lightnvm/pblk-recovery.c
> +++ b/drivers/lightnvm/pblk-recovery.c
> @@ -844,6 +844,7 @@ struct pblk_line *pblk_recov_l2p(struct pblk *pblk)
> 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) {
> --
> 1.8.3.1
I think you are right. Good catch.
Reviewed-by: Javier González <javier@javigon.com>
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lightnvm: pblk: set propper line as data_line after gc
2019-03-18 15:27 [PATCH] lightnvm: pblk: set propper line as data_line after gc Marcin Dziegielewski
2019-03-18 19:12 ` Javier González
@ 2019-03-25 10:54 ` Matias Bjørling
1 sibling, 0 replies; 3+ messages in thread
From: Matias Bjørling @ 2019-03-25 10:54 UTC (permalink / raw)
To: Marcin Dziegielewski, javier, hans.holmberg; +Cc: linux-block, igor.j.konopko
On 3/18/19 4:27 PM, Marcin Dziegielewski wrote:
> 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. This patch fixes that issue.
>
> Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
> ---
> drivers/lightnvm/pblk-recovery.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
> index 83b467b..017874e 100644
> --- a/drivers/lightnvm/pblk-recovery.c
> +++ b/drivers/lightnvm/pblk-recovery.c
> @@ -844,6 +844,7 @@ struct pblk_line *pblk_recov_l2p(struct pblk *pblk)
> 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) {
>
Thanks Marcin.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-25 10:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 15:27 [PATCH] lightnvm: pblk: set propper line as data_line after gc Marcin Dziegielewski
2019-03-18 19:12 ` Javier González
2019-03-25 10:54 ` Matias Bjørling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).