#include "dm-btree.h"
#include "dm-btree-internal.h"
#include "dm-transaction-manager.h"
#include <linux/export.h>
#include <linux/device-mapper.h>
#define DM_MSG_PREFIX …
static void node_shift(struct btree_node *n, int shift)
{ … }
static int node_copy(struct btree_node *left, struct btree_node *right, int shift)
{ … }
static void delete_at(struct btree_node *n, unsigned int index)
{ … }
static unsigned int merge_threshold(struct btree_node *n)
{ … }
struct child { … };
static int init_child(struct dm_btree_info *info, struct dm_btree_value_type *vt,
struct btree_node *parent,
unsigned int index, struct child *result)
{ … }
static void exit_child(struct dm_btree_info *info, struct child *c)
{ … }
static int shift(struct btree_node *left, struct btree_node *right, int count)
{ … }
static int __rebalance2(struct dm_btree_info *info, struct btree_node *parent,
struct child *l, struct child *r)
{ … }
static int rebalance2(struct shadow_spine *s, struct dm_btree_info *info,
struct dm_btree_value_type *vt, unsigned int left_index)
{ … }
static int delete_center_node(struct dm_btree_info *info, struct btree_node *parent,
struct child *l, struct child *c, struct child *r,
struct btree_node *left, struct btree_node *center, struct btree_node *right,
uint32_t nr_left, uint32_t nr_center, uint32_t nr_right)
{ … }
static int redistribute3(struct dm_btree_info *info, struct btree_node *parent,
struct child *l, struct child *c, struct child *r,
struct btree_node *left, struct btree_node *center, struct btree_node *right,
uint32_t nr_left, uint32_t nr_center, uint32_t nr_right)
{ … }
static int __rebalance3(struct dm_btree_info *info, struct btree_node *parent,
struct child *l, struct child *c, struct child *r)
{ … }
static int rebalance3(struct shadow_spine *s, struct dm_btree_info *info,
struct dm_btree_value_type *vt, unsigned int left_index)
{ … }
static int rebalance_children(struct shadow_spine *s,
struct dm_btree_info *info,
struct dm_btree_value_type *vt, uint64_t key)
{ … }
static int do_leaf(struct btree_node *n, uint64_t key, unsigned int *index)
{ … }
static int remove_raw(struct shadow_spine *s, struct dm_btree_info *info,
struct dm_btree_value_type *vt, dm_block_t root,
uint64_t key, unsigned int *index)
{ … }
int dm_btree_remove(struct dm_btree_info *info, dm_block_t root,
uint64_t *keys, dm_block_t *new_root)
{ … }
EXPORT_SYMBOL_GPL(…);
static int remove_nearest(struct shadow_spine *s, struct dm_btree_info *info,
struct dm_btree_value_type *vt, dm_block_t root,
uint64_t key, int *index)
{ … }
static int remove_one(struct dm_btree_info *info, dm_block_t root,
uint64_t *keys, uint64_t end_key,
dm_block_t *new_root, unsigned int *nr_removed)
{ … }
int dm_btree_remove_leaves(struct dm_btree_info *info, dm_block_t root,
uint64_t *first_key, uint64_t end_key,
dm_block_t *new_root, unsigned int *nr_removed)
{ … }
EXPORT_SYMBOL_GPL(…);