bcache: Abstract out stuff needed for sorting
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user