mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
lightnvm: fold get bb tbl when using dual/quad plane mode
When the media manager runs in dual or quad plane mode, lightnvm abstracts away plane specific commands. This poses a problem for get bad block table, as it reports bad blocks per plane, making the table either two or four times bigger than expected. Fold the bad block list before returning. Signed-off-by: Matias Bjørling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
5e422cffe8
commit
d5bdec8ddb
3 changed files with 45 additions and 9 deletions
|
|
@ -250,7 +250,7 @@ int nvm_set_rqd_ppalist(struct nvm_dev *dev, struct nvm_rq *rqd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
plane_cnt = (1 << dev->plane_mode);
|
||||
plane_cnt = dev->plane_mode;
|
||||
rqd->nr_pages = plane_cnt * nr_ppas;
|
||||
|
||||
if (dev->ops->max_phys_sect < rqd->nr_pages)
|
||||
|
|
|
|||
Loading…
Reference in a new issue