From: "Javier González" <javier@javigon.com>
To: mb@lightnvm.io
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
"Javier González" <javier@cnexlabs.com>
Subject: [PATCH 2/4] lightnvm: assign block address before slba
Date: Fri, 31 Aug 2018 15:34:35 +0200 [thread overview]
Message-ID: <1535722477-31288-3-git-send-email-javier@cnexlabs.com> (raw)
In-Reply-To: <1535722477-31288-1-git-send-email-javier@cnexlabs.com>
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
next prev parent reply other threads:[~2018-08-31 13:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 13:34 [PATCH 0/4] lightnvm: pblk: add support for chunk metadata on erase Javier González
2018-08-31 13:34 ` [PATCH 1/4] lightnvm: use right address format on 1.2 path Javier González
2018-08-31 13:34 ` Javier González [this message]
2018-09-04 10:09 ` [PATCH 2/4] lightnvm: assign block address before slba Matias Bjørling
2018-08-31 13:34 ` [PATCH 3/4] lightnvm: pblk: add helper for printing chunk state Javier González
2018-08-31 13:34 ` [PATCH 4/4] lightnvm: pblk: retrieve chunk metadata on erase Javier González
2018-08-31 13:57 ` [PATCH 0/4] lightnvm: pblk: add support for " Matias Bjørling
2018-09-03 9:16 ` Javier Gonzalez
2018-09-04 9:54 ` Matias Bjørling
2018-09-04 17:16 ` Javier Gonzalez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1535722477-31288-3-git-send-email-javier@cnexlabs.com \
--to=javier@javigon.com \
--cc=javier@cnexlabs.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mb@lightnvm.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®