bcache: Kill op->replace

This is prep work for converting bch_btree_insert to
bch_btree_map_leaf_nodes() - we have to convert all its arguments to
actual arguments. Bunch of churn, but should be straightforward.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
Kent Overstreet
2013-09-10 18:52:54 -07:00
parent faadf0c965
commit 1b207d80d5
7 changed files with 71 additions and 73 deletions

View File

@@ -146,16 +146,14 @@ static void write_dirty_finish(struct closure *cl)
bch_btree_op_init(&op, -1);
bch_keylist_init(&keys);
op.type = BTREE_REPLACE;
bkey_copy(&op.replace, &w->key);
SET_KEY_DIRTY(&w->key, false);
bch_keylist_add(&keys, &w->key);
bkey_copy(keys.top, &w->key);
SET_KEY_DIRTY(keys.top, false);
bch_keylist_push(&keys);
for (i = 0; i < KEY_PTRS(&w->key); i++)
atomic_inc(&PTR_BUCKET(dc->disk.c, &w->key, i)->pin);
bch_btree_insert(&op, dc->disk.c, &keys, NULL);
bch_btree_insert(&op, dc->disk.c, &keys, NULL, &w->key);
if (op.insert_collision)
trace_bcache_writeback_collision(&w->key);