Skip to content

Commit

Permalink
lightnvm: do no update csecs and sos on 1.2
Browse files Browse the repository at this point in the history
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: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Javier González authored and Jens Axboe committed Oct 9, 2018
1 parent d672d92 commit 6fd05ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/nvme/host/lightnvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,9 @@ void nvme_nvm_update_nvm_info(struct nvme_ns *ns)
struct nvm_dev *ndev = ns->ndev;
struct nvm_geo *geo = &ndev->geo;

if (geo->version == NVM_OCSSD_SPEC_12)
return;

geo->csecs = 1 << ns->lba_shift;
geo->sos = ns->ms;
}
Expand Down

0 comments on commit 6fd05ca

Please sign in to comment.