提交 cdf73455 编写于 作者: J Javier González 提交者: Greg Kroah-Hartman

lightnvm: do no update csecs and sos on 1.2

[ Upstream commit 6fd05cad5ee1290b276dd8ed90a1e019b1fa577a ]

1.2 devices exposes their data and metadata size through the separate
identify command. Make sure that the NVMe LBA format does not override
these values.
Signed-off-by: NJavier González <javier@cnexlabs.com>
Signed-off-by: NMatias Bjørling <mb@lightnvm.io>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 1fb60da4
...@@ -968,6 +968,9 @@ void nvme_nvm_update_nvm_info(struct nvme_ns *ns) ...@@ -968,6 +968,9 @@ void nvme_nvm_update_nvm_info(struct nvme_ns *ns)
struct nvm_dev *ndev = ns->ndev; struct nvm_dev *ndev = ns->ndev;
struct nvm_geo *geo = &ndev->geo; struct nvm_geo *geo = &ndev->geo;
if (geo->version == NVM_OCSSD_SPEC_12)
return;
geo->csecs = 1 << ns->lba_shift; geo->csecs = 1 << ns->lba_shift;
geo->sos = ns->ms; geo->sos = ns->ms;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册