12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #ifndef GENNVM_H_
- #define GENNVM_H_
- #include <linux/module.h>
- #include <linux/vmalloc.h>
- #include <linux/lightnvm.h>
- struct gen_lun {
- struct nvm_lun vlun;
- int reserved_blocks;
-
- struct list_head used_list;
- struct list_head free_list;
- struct list_head bb_list;
- };
- struct gen_dev {
- struct nvm_dev *dev;
- int nr_luns;
- struct gen_lun *luns;
- struct list_head area_list;
- struct mutex lock;
- struct list_head targets;
- };
- struct gen_area {
- struct list_head list;
- sector_t begin;
- sector_t end;
- };
- #define gen_for_each_lun(bm, lun, i) \
- for ((i) = 0, lun = &(bm)->luns[0]; \
- (i) < (bm)->nr_luns; (i)++, lun = &(bm)->luns[(i)])
- #endif
|