summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/btree.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-12-21 05:22:05 +0400
committerKent Overstreet <kmo@daterainc.com>2014-01-09 01:05:12 +0400
commit65d45231b56efb3db51eb441e2c68f8252ecdd12 (patch)
treeb862e6fa72d076373c79841b555ef525d3b0f41b /drivers/md/bcache/btree.c
parentee811287c9f241641899788cbfc9d70ed96ba3a5 (diff)
downloadlinux-65d45231b56efb3db51eb441e2c68f8252ecdd12.tar.xz
bcache: Abstract out stuff needed for sorting
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/btree.c')
-rw-r--r--drivers/md/bcache/btree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 89252e7f2879..6734e2759b93 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -23,6 +23,7 @@
#include "bcache.h"
#include "btree.h"
#include "debug.h"
+#include "extents.h"
#include "writeback.h"
#include <linux/slab.h>
@@ -931,6 +932,11 @@ out:
b->level = level;
b->parent = (void *) ~0UL;
+ if (!b->level)
+ b->ops = &bch_extent_keys_ops;
+ else
+ b->ops = &bch_btree_keys_ops;
+
mca_reinit(b);
return b;