diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-07-25 04:26:51 +0400 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-11 09:56:02 +0400 |
commit | 0b93207abb40d3c42bb83eba1e1e7edc1da77810 (patch) | |
tree | eeca92af43a3d2413dc0a425f5cb71cfd4cad764 /drivers/md/bcache/writeback.c | |
parent | a34a8bfd4e6358c646928320d37b0425c0762f8a (diff) | |
download | linux-0b93207abb40d3c42bb83eba1e1e7edc1da77810.tar.xz |
bcache: Move keylist out of btree_op
Slowly working on pruning struct btree_op - the aim is for it to only
contain things that are actually necessary for traversing the btree.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/writeback.c')
-rw-r--r-- | drivers/md/bcache/writeback.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index 8ffc8ec7231d..51dc709c9bf7 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c @@ -300,18 +300,21 @@ static void write_dirty_finish(struct closure *cl) if (KEY_DIRTY(&w->key)) { unsigned i; struct btree_op op; + struct keylist keys; + bch_btree_op_init_stack(&op); + bch_keylist_init(&keys); op.type = BTREE_REPLACE; bkey_copy(&op.replace, &w->key); SET_KEY_DIRTY(&w->key, false); - bch_keylist_add(&op.keys, &w->key); + bch_keylist_add(&keys, &w->key); 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, &op.keys); + bch_btree_insert(&op, dc->disk.c, &keys); closure_sync(&op.cl); if (op.insert_collision) |