Lines Matching refs:root

71 	struct rb_root *root;  member
85 struct rb_root root; member
160 #define TREE_ROOT(d, name) (&d->trees[MTDSWAP_ ## name].root)
194 if (eb->root) { in mtdswap_eb_detach()
195 tp = container_of(eb->root, struct mtdswap_tree, root); in mtdswap_eb_detach()
199 rb_erase(&eb->rb, eb->root); in mtdswap_eb_detach()
203 static void __mtdswap_rb_add(struct rb_root *root, struct swap_eb *eb) in __mtdswap_rb_add() argument
208 p = &root->rb_node; in __mtdswap_rb_add()
219 rb_insert_color(&eb->rb, root); in __mtdswap_rb_add()
224 struct rb_root *root; in mtdswap_rb_add() local
226 if (eb->root == &d->trees[idx].root) in mtdswap_rb_add()
230 root = &d->trees[idx].root; in mtdswap_rb_add()
231 __mtdswap_rb_add(root, eb); in mtdswap_rb_add()
232 eb->root = root; in mtdswap_rb_add()
236 static struct rb_node *mtdswap_rb_index(struct rb_root *root, unsigned int idx) in mtdswap_rb_index() argument
241 p = rb_first(root); in mtdswap_rb_index()
259 eb->root = NULL; in mtdswap_handle_badblock()
578 eb->root = NULL; in mtdswap_map_free_block()
766 if (d->trees[idx].root.rb_node != NULL) in __mtdswap_choose_gc_tree()
804 struct rb_root *root; in mtdswap_choose_wl_tree() local
808 root = &d->trees[i].root; in mtdswap_choose_wl_tree()
809 if (root->rb_node == NULL) in mtdswap_choose_wl_tree()
812 wear = d->max_erase_count - MTDSWAP_ECNT_MIN(root); in mtdswap_choose_wl_tree()
859 rp = &d->trees[idx].root; in mtdswap_pick_gc_eblk()
863 eb->root = NULL; in mtdswap_pick_gc_eblk()
1184 struct rb_root *root = &d->trees[i].root; in mtdswap_show() local
1186 if (root->rb_node) { in mtdswap_show()
1188 min[i] = MTDSWAP_ECNT_MIN(root); in mtdswap_show()
1189 max[i] = MTDSWAP_ECNT_MAX(root); in mtdswap_show()
1257 struct dentry *root = d->mtd->dbg.dfs_dir; in mtdswap_add_debugfs() local
1262 if (IS_ERR_OR_NULL(root)) in mtdswap_add_debugfs()
1265 debugfs_create_file("mtdswap_stats", S_IRUSR, root, d, &mtdswap_fops); in mtdswap_add_debugfs()
1286 d->trees[i].root = RB_ROOT; in mtdswap_init()