lkml.org 
[lkml]   [2018]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] lightnvm: assign block address before slba
Date
In 1.2, the chunk slba is set to the physical representation of the
block. Thus, assigning the block to the ppa must occur before the slba
is assign.

Signed-off-by: Javier González <javier@cnexlabs.com>
---
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 e9f14c67f4f3..efb976a863d2 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -945,6 +945,8 @@ static int nvm_bb_to_chunk(struct nvm_dev *dev, struct ppa_addr ppa,
}
}

+ ppa.g.blk = blk;
+
meta->wp = 0;
meta->type = NVM_CHK_TP_W_SEQ;
meta->wi = 0;
@@ -952,7 +954,6 @@ static int nvm_bb_to_chunk(struct nvm_dev *dev, struct ppa_addr ppa,
meta->cnlb = dev->geo.clba;

if (blktype == NVM_BLK_T_FREE) {
- ppa.a.blk = blk;
ret = nvm_bb_chunk_scan(dev, ppa, meta);
if (ret)
return ret;
--
2.7.4
\
 
 \ /
  Last update: 2018-08-31 15:39    [W:0.078 / U:4.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site