diff options
author | Javier González <jg@lightnvm.io> | 2016-11-28 22:39:04 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-29 12:12:51 -0700 |
commit | de93434fcf74d41754a48e45365a5914e00bc0be (patch) | |
tree | 9eae34dfc2ddf9fa9fad129fb78e1f00e90277ae /include | |
parent | 98379a12c54974ee5856dcf81781a5dc845505c3 (diff) | |
download | op-kernel-dev-de93434fcf74d41754a48e45365a5914e00bc0be.zip op-kernel-dev-de93434fcf74d41754a48e45365a5914e00bc0be.tar.gz |
lightnvm: remove gen_lun abstraction
The gen_lun abstraction in the generic media manager was conceived on
the assumption that a single target would instantiated on top of it.
This has complicated target design to implement multi-instances. Remove
this abstraction and move its logic to nvm_lun, which manages physical
lun geometry and operations.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/lightnvm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 98278a9..33940bd 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -275,7 +275,17 @@ struct nvm_lun { spinlock_t lock; + /* lun block lists */ + struct list_head used_list; /* In-use blocks */ + struct list_head free_list; /* Not used blocks i.e. released + * and ready for use + */ + struct list_head bb_list; /* Bad blocks. Mutually exclusive with + * free_list and used_list + */ unsigned int nr_free_blocks; /* Number of unused blocks */ + int reserved_blocks; + struct nvm_block *blocks; }; |