mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
nvme: lightnvm: add late setup of block size and metadata
The nvme driver sets up the size of the nvme namespace in two steps. First it initializes the device with standard logical block and metadata sizes, and then sets the correct logical block and metadata size. Due to the OCSSD 2.0 specification relies on the namespace to expose these sizes for correct initialization, let it be updated appropriately on the LightNVM side as well. Signed-off-by: Matias Bjørling <[email protected]> Acked-by: Keith Busch <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
89a09c5643
commit
96257a8a7f
4 changed files with 12 additions and 3 deletions
|
|
@ -864,8 +864,6 @@ static int nvm_core_init(struct nvm_dev *dev)
|
|||
geo->ws_seq = id->ws_seq;
|
||||
geo->ws_per_chk = id->ws_per_chk;
|
||||
geo->nr_chks = id->num_chk;
|
||||
geo->sec_size = id->csecs;
|
||||
geo->oob_size = id->sos;
|
||||
geo->mccap = id->mccap;
|
||||
|
||||
geo->sec_per_chk = id->clba;
|
||||
|
|
@ -893,7 +891,6 @@ static int nvm_core_init(struct nvm_dev *dev)
|
|||
if (ret)
|
||||
goto err_fmtype;
|
||||
|
||||
blk_queue_logical_block_size(dev->q, geo->sec_size);
|
||||
return 0;
|
||||
err_fmtype:
|
||||
kfree(dev->lun_map);
|
||||
|
|
|
|||
Loading…
Reference in a new issue