diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-07-24 17:26:51 -0700 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-10 21:56:02 -0800 |
commit | 0b93207abb40d3c42bb83eba1e1e7edc1da77810 (patch) | |
tree | eeca92af43a3d2413dc0a425f5cb71cfd4cad764 /drivers/md/bcache/writeback.c | |
parent | a34a8bfd4e6358c646928320d37b0425c0762f8a (diff) | |
download | op-kernel-dev-0b93207abb40d3c42bb83eba1e1e7edc1da77810.zip op-kernel-dev-0b93207abb40d3c42bb83eba1e1e7edc1da77810.tar.gz |
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 8ffc8ec..51dc709 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) |