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/journal.c | |
parent | a34a8bfd4e6358c646928320d37b0425c0762f8a (diff) | |
download | linux-0b93207abb40d3c42bb83eba1e1e7edc1da77810.tar.bz2 |
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/journal.c')
-rw-r--r-- | drivers/md/bcache/journal.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 940e89e0d706..8866f8ee3a07 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -301,6 +301,9 @@ int bch_journal_replay(struct cache_set *s, struct list_head *list, list_entry(list->prev, struct journal_replay, list); uint64_t start = i->j.last_seq, end = i->j.seq, n = start; + struct keylist keylist; + + bch_keylist_init(&keylist); list_for_each_entry(i, list, list) { BUG_ON(i->pin && atomic_read(i->pin) != 1); @@ -314,16 +317,16 @@ int bch_journal_replay(struct cache_set *s, struct list_head *list, k = bkey_next(k)) { trace_bcache_journal_replay_key(k); - bkey_copy(op->keys.top, k); - bch_keylist_push(&op->keys); + bkey_copy(keylist.top, k); + bch_keylist_push(&keylist); op->journal = i->pin; - ret = bch_btree_insert(op, s, &op->keys); + ret = bch_btree_insert(op, s, &keylist); if (ret) goto err; - BUG_ON(!bch_keylist_empty(&op->keys)); + BUG_ON(!bch_keylist_empty(&keylist)); keys++; cond_resched(); |