nvme: refactor namespaces to support non-gendisk devices
[cascardo/linux.git] / drivers / lightnvm / core.c
index 9ebd2cf..25c5df9 100644 (file)
@@ -581,6 +581,8 @@ static int nvm_core_init(struct nvm_dev *dev)
        mutex_init(&dev->mlock);
        spin_lock_init(&dev->lock);
 
+       blk_queue_logical_block_size(dev->q, dev->sec_size);
+
        return 0;
 err_fmtype:
        kfree(dev->lun_map);