diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-11-11 21:38:51 -0500 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-01-08 16:05:13 -0500 |
commit | 89ebb4a28ba9efb5c9b18ba552e784021957b14a (patch) | |
tree | 7f649258fe76af99c63cb81c421c704a418abfe9 /drivers/md/bcache/btree.c | |
parent | dc9d98d621bdce0552997200ce855659875a5c9f (diff) |
bcache: Convert sorting to btree_keys
More work to disentangle various code from struct btree
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/btree.c')
-rw-r--r-- | drivers/md/bcache/btree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 2128ee1e6916..b14f34aa927d 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c | |||
@@ -480,9 +480,9 @@ void bch_btree_node_write(struct btree *b, struct closure *parent) | |||
480 | 480 | ||
481 | /* If not a leaf node, always sort */ | 481 | /* If not a leaf node, always sort */ |
482 | if (b->level && b->keys.nsets) | 482 | if (b->level && b->keys.nsets) |
483 | bch_btree_sort(b, &b->c->sort); | 483 | bch_btree_sort(&b->keys, &b->c->sort); |
484 | else | 484 | else |
485 | bch_btree_sort_lazy(b, &b->c->sort); | 485 | bch_btree_sort_lazy(&b->keys, &b->c->sort); |
486 | 486 | ||
487 | /* | 487 | /* |
488 | * do verify if there was more than one set initially (i.e. we did a | 488 | * do verify if there was more than one set initially (i.e. we did a |
@@ -1087,7 +1087,7 @@ static struct btree *btree_node_alloc_replacement(struct btree *b, bool wait) | |||
1087 | { | 1087 | { |
1088 | struct btree *n = bch_btree_node_alloc(b->c, b->level, wait); | 1088 | struct btree *n = bch_btree_node_alloc(b->c, b->level, wait); |
1089 | if (!IS_ERR_OR_NULL(n)) { | 1089 | if (!IS_ERR_OR_NULL(n)) { |
1090 | bch_btree_sort_into(b, n, &b->c->sort); | 1090 | bch_btree_sort_into(&b->keys, &n->keys, &b->c->sort); |
1091 | bkey_copy_key(&n->key, &b->key); | 1091 | bkey_copy_key(&n->key, &b->key); |
1092 | } | 1092 | } |
1093 | 1093 | ||