+ if (!RB_EMPTY_ROOT(&td->io_hist_tree)) {
+ struct rb_node *n = rb_first(&td->io_hist_tree);
+
+ ipo = rb_entry(n, struct io_piece, rb_node);
+ rb_erase(n, &td->io_hist_tree);
+ } else if (!list_empty(&td->io_hist_list)) {
+ ipo = list_entry(td->io_hist_list.next, struct io_piece, list);