diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-09-11 05:52:54 +0400 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-11 09:56:29 +0400 |
commit | 1b207d80d5b986fb305bc899357435d319319513 (patch) | |
tree | bf75b0befff3f48606832df0a64ced1c3c3ae91d /drivers/md/bcache/writeback.c | |
parent | faadf0c96547ec8277ad0abd6959f2ef48522f31 (diff) | |
download | linux-1b207d80d5b986fb305bc899357435d319319513.tar.xz |
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>
Diffstat (limited to 'drivers/md/bcache/writeback.c')
-rw-r--r-- | drivers/md/bcache/writeback.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index d0968e8938f7..346a5341faca 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c @@ -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); |