Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1349185

[PATCH 5/5] lightnvm: do not load L2P table if not supported

From Matias Bjørling <m@bjorling.me>
Newsgroups linux.kernel
Subject [PATCH 5/5] lightnvm: do not load L2P table if not supported
Date 2016-03-03 15:10 +0100
Message-ID <r8C70-88W-19@gated-at.bofh.it> (permalink)
References <r8C6Z-88W-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Javier González <jg@lightnvm.io>

An Open-Channel SSD can work on two modes: (i) hybrid mode, where the
L2P table is maintained both by the host and by the device; and (ii)
full host-based, where the L2P table is uniquely maintained by the host.

In the advent of a new target implementing the full host-based mode, do
not assume that the L2P table must be loaded on the generic media
manager; check device properties loaded on the identify command instead.

Signed-off-by: Javier González <javier@cnexlabs.com>
Moved into the following statement.
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
 drivers/lightnvm/gennvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c
index 42c1c2a..72e124a 100644
--- a/drivers/lightnvm/gennvm.c
+++ b/drivers/lightnvm/gennvm.c
@@ -257,7 +257,7 @@ static int gennvm_blocks_init(struct nvm_dev *dev, struct gen_nvm *gn)
 		}
 	}
 
-	if (dev->ops->get_l2p_tbl) {
+	if ((dev->identity.dom & NVM_RSP_L2P) && dev->ops->get_l2p_tbl) {
 		ret = dev->ops->get_l2p_tbl(dev, 0, dev->total_secs,
 							gennvm_block_map, dev);
 		if (ret) {
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] LightNVM fixes for 4.6 Matias Bjørling <m@bjorling.me> - 2016-03-03 15:10 +0100
  [PATCH 4/5] lightnvm: do not reserve lun on l2p loading Matias Bjørling <m@bjorling.me> - 2016-03-03 15:10 +0100
  [PATCH 3/5] nvme: lightnvm: return ppa completion status Matias Bjørling <m@bjorling.me> - 2016-03-03 15:10 +0100
  [PATCH 5/5] lightnvm: do not load L2P table if not supported Matias Bjørling <m@bjorling.me> - 2016-03-03 15:10 +0100
  [PATCH 2/5] lightnvm: add a bitmap of luns Matias Bjørling <m@bjorling.me> - 2016-03-03 15:10 +0100
  [PATCH 1/5] lightnvm: specify target's logical address area Matias Bjørling <m@bjorling.me> - 2016-03-03 15:10 +0100
  Re: [PATCH 0/5] LightNVM fixes for 4.6 Jens Axboe <axboe@fb.com> - 2016-03-03 16:10 +0100

csiph-web