Lines Matching refs:mtdswap_dev
113 struct mtdswap_dev { struct
178 #define MTDSWAP_MBD_TO_MTDSWAP(dev) ((struct mtdswap_dev *)dev->priv)
195 static int mtdswap_gc(struct mtdswap_dev *d, unsigned int background);
197 static loff_t mtdswap_eb_offset(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_eb_offset()
202 static void mtdswap_eb_detach(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_eb_detach()
235 static void mtdswap_rb_add(struct mtdswap_dev *d, struct swap_eb *eb, int idx) in mtdswap_rb_add()
264 static int mtdswap_handle_badblock(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_handle_badblock()
292 static int mtdswap_handle_write_error(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_handle_write_error()
310 static int mtdswap_read_oob(struct mtdswap_dev *d, loff_t from, in mtdswap_read_oob()
334 static int mtdswap_read_markers(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_read_markers()
380 static int mtdswap_write_marker(struct mtdswap_dev *d, struct swap_eb *eb, in mtdswap_write_marker()
429 static void mtdswap_check_counts(struct mtdswap_dev *d) in mtdswap_check_counts()
468 static void mtdswap_scan_eblks(struct mtdswap_dev *d) in mtdswap_scan_eblks()
517 static void mtdswap_store_eb(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_store_eb()
539 static int mtdswap_erase_block(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_erase_block()
575 static int mtdswap_map_free_block(struct mtdswap_dev *d, unsigned int page, in mtdswap_map_free_block()
616 static unsigned int mtdswap_free_page_cnt(struct mtdswap_dev *d) in mtdswap_free_page_cnt()
622 static unsigned int mtdswap_enough_free_pages(struct mtdswap_dev *d) in mtdswap_enough_free_pages()
627 static int mtdswap_write_block(struct mtdswap_dev *d, char *buf, in mtdswap_write_block()
688 static int mtdswap_move_block(struct mtdswap_dev *d, unsigned int oldblock, in mtdswap_move_block()
746 static int mtdswap_gc_eblock(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_gc_eblock()
770 static int __mtdswap_choose_gc_tree(struct mtdswap_dev *d) in __mtdswap_choose_gc_tree()
814 static int mtdswap_choose_wl_tree(struct mtdswap_dev *d) in mtdswap_choose_wl_tree()
842 static int mtdswap_choose_gc_tree(struct mtdswap_dev *d, in mtdswap_choose_gc_tree()
858 static struct swap_eb *mtdswap_pick_gc_eblk(struct mtdswap_dev *d, in mtdswap_pick_gc_eblk()
887 static unsigned int mtdswap_eblk_passes(struct mtdswap_dev *d, in mtdswap_eblk_passes()
951 static int mtdswap_gc(struct mtdswap_dev *d, unsigned int background) in mtdswap_gc()
991 struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev); in mtdswap_background()
1001 static void mtdswap_cleanup(struct mtdswap_dev *d) in mtdswap_cleanup()
1012 struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev); in mtdswap_flush()
1036 struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev); in mtdswap_writesect()
1076 static int mtdswap_auto_header(struct mtdswap_dev *d, char *buf) in mtdswap_auto_header()
1094 struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev); in mtdswap_readsect()
1158 struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev); in mtdswap_discard()
1185 struct mtdswap_dev *d = (struct mtdswap_dev *) s->private; in mtdswap_show()
1281 static int mtdswap_add_debugfs(struct mtdswap_dev *d) in mtdswap_add_debugfs()
1302 static int mtdswap_init(struct mtdswap_dev *d, unsigned int eblocks, in mtdswap_init()
1366 struct mtdswap_dev *d; in mtdswap_add_mtd()
1448 d = kzalloc(sizeof(struct mtdswap_dev), GFP_KERNEL); in mtdswap_add_mtd()
1496 struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev); in mtdswap_remove_dev()