From: "Javier González" <jg@lightnvm.io>
To: mb@lightnvm.io
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
"Javier González" <javier@cnexlabs.com>
Subject: [PATCH] lightnvm: clear reserved bit on generic addr
Date: Wed, 11 May 2016 14:08:26 +0200 [thread overview]
Message-ID: <1462968506-9292-1-git-send-email-javier@cnexlabs.com> (raw)
When an address is converted from device to generic mode, the reserved
bit needs to be cleared in order to signal that the address points to a
flash block, not to a cacheline on the write buffer.
Signed-off-by: Javier González <javier@cnexlabs.com>
---
include/linux/lightnvm.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 45be892..3d2c380 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -418,6 +418,9 @@ static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev,
l.g.ch |= (r.ppa >> dev->ppaf.ch_offset) &
(((1 << dev->ppaf.ch_len) - 1));
+ /* On device side, reserved bit is always 0 */
+ l.g.reserved = 0;
+
return l;
}
--
2.5.0
next reply other threads:[~2016-05-11 12:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 12:08 Javier González [this message]
2016-05-25 7:11 ` Matias Bjørling
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=1462968506-9292-1-git-send-email-javier@cnexlabs.com \
--to=jg@lightnvm.io \
--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®