mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
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>
This commit is contained in:
parent
98379a12c5
commit
de93434fcf
3 changed files with 53 additions and 58 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue