-#if defined(DEBUG)
-void __dump_rb_node(struct rb_node *n)
-{
- struct io *iop = rb_entry(n, struct io, rb_node);
-
- dbg_ping();
- __dump_iop(stdout, iop, 0);
- if (n->rb_left)
- __dump_rb_node(n->rb_left);
- if (n->rb_right)
- __dump_rb_node(n->rb_right);
-}
-
-void __dump_rb_tree(struct d_info *dip, enum iop_type type)
-{
- struct rb_root *roots = dip->heads;
- struct rb_root *root = &roots[type];
- struct rb_node *n = root->rb_node;
-
- if (n) {
- printf("\tIOP_%c\n", type2c(type));
- __dump_rb_node(n);
- }
-}
-
-void dump_rb_trees(void)
-{
- int i;
- enum iop_type type;
- struct d_info *dip;
- struct list_head *p;
-
- for (i = 0; i < N_DEV_HASH; i++) {
- __list_for_each(p, &dev_heads[i]) {
- dip = list_entry(p, struct d_info, hash_head);
- printf("Trees for %3d,%-3d\n", MAJOR(dip->device),
- MINOR(dip->device));
- for (type = IOP_Q; type < N_IOP_TYPES; type++)
- __dump_rb_tree(dip, type);
- }
- }
-}
-#endif
-