Lines Matching refs:swap_eb
82 struct swap_eb { struct
92 #define MTDSWAP_ECNT_MIN(rbroot) (rb_entry(rb_first(rbroot), struct swap_eb, \ argument
94 #define MTDSWAP_ECNT_MAX(rbroot) (rb_entry(rb_last(rbroot), struct swap_eb, \
125 struct swap_eb *eb_data;
137 struct swap_eb *curr_write;
199 static loff_t mtdswap_eb_offset(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_eb_offset()
204 static void mtdswap_eb_detach(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_eb_detach()
218 static void __mtdswap_rb_add(struct rb_root *root, struct swap_eb *eb) in __mtdswap_rb_add()
221 struct swap_eb *cur; in __mtdswap_rb_add()
226 cur = rb_entry(parent, struct swap_eb, rb); in __mtdswap_rb_add()
237 static void mtdswap_rb_add(struct mtdswap_dev *d, struct swap_eb *eb, int idx) in mtdswap_rb_add()
266 static int mtdswap_handle_badblock(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_handle_badblock()
294 static int mtdswap_handle_write_error(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_handle_write_error()
297 struct swap_eb *curr_write = d->curr_write; in mtdswap_handle_write_error()
336 static int mtdswap_read_markers(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_read_markers()
382 static int mtdswap_write_marker(struct mtdswap_dev *d, struct swap_eb *eb, in mtdswap_write_marker()
435 struct swap_eb *eb; in mtdswap_check_counts()
453 median = rb_entry(medrb, struct swap_eb, rb)->erase_count; in mtdswap_check_counts()
474 struct swap_eb *eb; in mtdswap_scan_eblks()
519 static void mtdswap_store_eb(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_store_eb()
548 static int mtdswap_erase_block(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_erase_block()
615 struct swap_eb *old_eb = d->curr_write; in mtdswap_map_free_block()
617 struct swap_eb *eb; in mtdswap_map_free_block()
625 eb = rb_entry(rb_first(clean_root), struct swap_eb, rb); in mtdswap_map_free_block()
667 struct swap_eb *eb; in mtdswap_write_block()
728 struct swap_eb *eb, *oldeb; in mtdswap_move_block()
782 static int mtdswap_gc_eblock(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_gc_eblock()
894 static struct swap_eb *mtdswap_pick_gc_eblk(struct mtdswap_dev *d, in mtdswap_pick_gc_eblk()
898 struct swap_eb *eb = NULL; in mtdswap_pick_gc_eblk()
910 eb = rb_entry(rb_first(rp), struct swap_eb, rb); in mtdswap_pick_gc_eblk()
924 struct swap_eb *eb) in mtdswap_eblk_passes()
989 struct swap_eb *eb; in mtdswap_gc()
1074 struct swap_eb *eb; in mtdswap_writesect()
1134 struct swap_eb *eb; in mtdswap_readsect()
1196 struct swap_eb *eb; in mtdswap_discard()
1238 min[i] = rb_entry(rb_first(root), struct swap_eb, in mtdswap_show()
1240 max[i] = rb_entry(rb_last(root), struct swap_eb, in mtdswap_show()
1375 eblk_bytes = sizeof(struct swap_eb)*d->eblks; in mtdswap_init()