2 * Copyright: Matias Bjorling <mb@bjorling.me>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License version
6 * 2 as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
18 #include <linux/module.h>
19 #include <linux/vmalloc.h>
21 #include <linux/lightnvm.h>
28 struct list_head used_list
; /* In-use blocks */
29 struct list_head free_list
; /* Not used blocks i.e. released
32 struct list_head bb_list
; /* Bad blocks. Mutually exclusive with
33 * free_list and used_list
42 struct list_head area_list
;
45 struct list_head targets
;
49 struct list_head list
;
51 sector_t end
; /* end is excluded */
54 #define gen_for_each_lun(bm, lun, i) \
55 for ((i) = 0, lun = &(bm)->luns[0]; \
56 (i) < (bm)->nr_luns; (i)++, lun = &(bm)->luns[(i)])
58 #endif /* GENNVM_H_ */