lightnvm: use system block for mm initialization

Use system block information to register the appropriate media manager.
This enables the LightNVM subsystem to instantiate a media manager
selected by the user, instead of relying on automatic detection by each
media manager loaded in the kernel.

A device must now be initialized before it can proceed to initialize its
media manager. Upon initialization, the configured media manager is
automatically initialized as well.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Matias Bjørling
2016-01-12 07:49:38 +01:00
committed by Jens Axboe
parent 5569615424
commit b769207678
2 changed files with 26 additions and 2 deletions

View File

@@ -301,6 +301,9 @@ struct nvm_dev {
struct nvmm_type *mt;
void *mp;
/* System blocks */
struct nvm_sb_info sb;
/* Device information */
int nr_chnls;
int nr_planes;