lkml.org 
[lkml]   [2016]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/5] lightnvm: set block priority in nvm_set_rqd_ppalist()
Date
When a ppa_list with vblks is expanded, it can either go block or
plane first. Currently it is been plane first. This works well for a
single vblk that is expanded, but fails for controllers that
require data for all planes is grouped together. Make the ppa_list
expand first expand with block, and then plane to support this
behavior.

Before (2 blocks, 4 planes per vblk)
idx block plane
0 0 0
1 1 0
2 0 1
3 1 1
4 0 2
5 1 2
6 0 3
7 1 3

After
idx block plane
0 0 0
1 0 1
2 0 2
3 0 3
4 1 0
5 1 1
6 1 2
7 1 3

Signed-off-by: Matias Bjørling <m@bjorling.me>
---
drivers/lightnvm/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index de5db7b..0e82798 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -279,7 +279,8 @@ int nvm_set_rqd_ppalist(struct nvm_dev *dev, struct nvm_rq *rqd,
for (i = 0; i < nr_ppas; i++) {
for (pl_idx = 0; pl_idx < plane_cnt; pl_idx++) {
ppas[i].g.pl = pl_idx;
- rqd->ppa_list[(pl_idx * nr_ppas) + i] = ppas[i];
+ rqd->ppa_list[(plane_cnt * i) + pl_idx] =
+ ppas[i];
}
}
}
--
2.1.4
\
 
 \ /
  Last update: 2016-04-26 12:41    [W:0.084 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site