bcache: Abstract out stuff needed for sorting

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
Kent Overstreet
2013-12-20 17:22:05 -08:00
parent ee811287c9
commit 65d45231b5
9 changed files with 423 additions and 289 deletions

View File

@@ -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;