diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-12-20 17:22:05 -0800 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-01-08 13:05:12 -0800 |
commit | 65d45231b56efb3db51eb441e2c68f8252ecdd12 (patch) | |
tree | b862e6fa72d076373c79841b555ef525d3b0f41b /drivers/md/bcache/btree.c | |
parent | ee811287c9f241641899788cbfc9d70ed96ba3a5 (diff) | |
download | op-kernel-dev-65d45231b56efb3db51eb441e2c68f8252ecdd12.zip op-kernel-dev-65d45231b56efb3db51eb441e2c68f8252ecdd12.tar.gz |
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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 89252e7..6734e27 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; |