lightnvm: do no update csecs and sos on 1.2
authorJavier González <javier@javigon.com>
Tue, 9 Oct 2018 11:12:12 +0000 (13:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Oct 2018 14:25:08 +0000 (08:25 -0600)
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>
drivers/nvme/host/lightnvm.c

index 7d0a4d3b0a4888d20e6b8801e66d21a36dfa2478..a4f3b263cd6c60ee0a77498fdf590ee95d5b8f8b 100644 (file)
@@ -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;
 }