summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2016-06-07 16:25:38 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2016-07-30 01:13:54 -0800
commitcd336596ae51c0d56aac0e29a19e9a15b31bd3a7 (patch)
tree9c7f6924b3ab3f543257b55db88ff075edb3e292
parent75f7ef0f069f175b70b09e074b2da19f140c20e9 (diff)
foo
-rw-r--r--drivers/md/bcache/btree_iter.c4
-rw-r--r--drivers/md/bcache/extents.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/md/bcache/btree_iter.c b/drivers/md/bcache/btree_iter.c
index 0c10780b74fb..0963827efe18 100644
--- a/drivers/md/bcache/btree_iter.c
+++ b/drivers/md/bcache/btree_iter.c
@@ -790,7 +790,9 @@ struct bkey_s_c bch_btree_iter_peek_with_holes(struct btree_iter *iter)
if (unlikely(ret))
return bkey_s_c_null;
- k = __btree_iter_peek_all(iter);
+ k = iter->is_extents
+ ? __btree_iter_peek(iter)
+ : __btree_iter_peek_all(iter);
recheck:
if (!k.k || bkey_cmp(bkey_start_pos(k.k), iter->pos) > 0) {
/* hole */
diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c
index 1adbcc05cf69..0693de44874a 100644
--- a/drivers/md/bcache/extents.c
+++ b/drivers/md/bcache/extents.c
@@ -1260,6 +1260,11 @@ bch_insert_fixup_extent(struct btree_insert_trans *trans,
EBUG_ON(bkey_cmp(iter->pos, bkey_start_pos(&insert->k->k)));
EBUG_ON(bkey_cmp(iter->pos, k.k->p) >= 0);
+ /* save iterator when k.k->size == 0... we're skipping past our
+ * insert pos */
+ //if (btree_node_iter_cmp())
+ // node_insert_iter = *node_iter;
+
if (!k.k->size) {
bch_btree_node_iter_advance(node_iter, &b->keys);
continue;