aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/btree.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-10 20:18:59 -0400
committerKent Overstreet <kmo@daterainc.com>2013-11-11 00:56:39 -0500
commit50310164bcd789eb3690f45a9baf8a507bf93358 (patch)
treed0b3ef83632f36073f0798260e56812cb37db271 /drivers/md/bcache/btree.c
parentbc9389eefe479b7b7b323c2729b61a7155d2d0ea (diff)
bcache: Kill bch_next_recurse_key()
This dates from before the btree iterator, and now it's finally gone Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/btree.c')
-rw-r--r--drivers/md/bcache/btree.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index bf8f5174b253..adc5bb0d8e92 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1680,9 +1680,9 @@ int bch_gc_thread_start(struct cache_set *c)
1680static int bch_btree_check_recurse(struct btree *b, struct btree_op *op, 1680static int bch_btree_check_recurse(struct btree *b, struct btree_op *op,
1681 unsigned long **seen) 1681 unsigned long **seen)
1682{ 1682{
1683 int ret; 1683 int ret = 0;
1684 unsigned i; 1684 unsigned i;
1685 struct bkey *k; 1685 struct bkey *k, *p = NULL;
1686 struct bucket *g; 1686 struct bucket *g;
1687 struct btree_iter iter; 1687 struct btree_iter iter;
1688 1688
@@ -1709,19 +1709,18 @@ static int bch_btree_check_recurse(struct btree *b, struct btree_op *op,
1709 } 1709 }
1710 1710
1711 if (b->level) { 1711 if (b->level) {
1712 k = bch_next_recurse_key(b, &ZERO_KEY); 1712 bch_btree_iter_init(b, &iter, NULL);
1713 1713
1714 while (k) { 1714 do {
1715 struct bkey *p = bch_next_recurse_key(b, k); 1715 k = bch_btree_iter_next_filter(&iter, b, bch_ptr_bad);
1716 if (p) 1716 if (k)
1717 btree_node_prefetch(b->c, p, b->level - 1); 1717 btree_node_prefetch(b->c, k, b->level - 1);
1718 1718
1719 ret = btree(check_recurse, k, b, op, seen); 1719 if (p)
1720 if (ret) 1720 ret = btree(check_recurse, p, b, op, seen);
1721 return ret;
1722 1721
1723 k = p; 1722 p = k;
1724 } 1723 } while (p && !ret);
1725 } 1724 }
1726 1725
1727 return 0; 1726 return 0;