lkml.org 
[lkml]   [2018]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/4] lightnvm: assign block address before slba
From
Date
On 08/31/2018 03:34 PM, Javier González wrote:
> 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;
>

Thanks. I've folded 1 & 2 into the bb patch.

\
 
 \ /
  Last update: 2018-09-04 12:10    [W:0.069 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site