aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/bset.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/bset.h')
-rw-r--r--drivers/md/bcache/bset.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/md/bcache/bset.h b/drivers/md/bcache/bset.h
index 4aa199d03344..759df830bb14 100644
--- a/drivers/md/bcache/bset.h
+++ b/drivers/md/bcache/bset.h
@@ -189,6 +189,8 @@ struct btree_keys_ops {
189 bool (*sort_cmp)(struct btree_iter_set, 189 bool (*sort_cmp)(struct btree_iter_set,
190 struct btree_iter_set); 190 struct btree_iter_set);
191 struct bkey *(*sort_fixup)(struct btree_iter *, struct bkey *); 191 struct bkey *(*sort_fixup)(struct btree_iter *, struct bkey *);
192 bool (*insert_fixup)(struct btree_keys *, struct bkey *,
193 struct btree_iter *, struct bkey *);
192 bool (*key_invalid)(struct btree_keys *, 194 bool (*key_invalid)(struct btree_keys *,
193 const struct bkey *); 195 const struct bkey *);
194 bool (*key_bad)(struct btree_keys *, const struct bkey *); 196 bool (*key_bad)(struct btree_keys *, const struct bkey *);
@@ -286,6 +288,16 @@ void bch_bset_init_next(struct btree_keys *, struct bset *, uint64_t);
286void bch_bset_build_written_tree(struct btree_keys *); 288void bch_bset_build_written_tree(struct btree_keys *);
287void bch_bset_fix_invalidated_key(struct btree_keys *, struct bkey *); 289void bch_bset_fix_invalidated_key(struct btree_keys *, struct bkey *);
288void bch_bset_insert(struct btree_keys *, struct bkey *, struct bkey *); 290void bch_bset_insert(struct btree_keys *, struct bkey *, struct bkey *);
291unsigned bch_btree_insert_key(struct btree_keys *, struct bkey *,
292 struct bkey *);
293
294enum {
295 BTREE_INSERT_STATUS_NO_INSERT = 0,
296 BTREE_INSERT_STATUS_INSERT,
297 BTREE_INSERT_STATUS_BACK_MERGE,
298 BTREE_INSERT_STATUS_OVERWROTE,
299 BTREE_INSERT_STATUS_FRONT_MERGE,
300};
289 301
290/* 302/*
291 * Tries to merge l and r: l should be lower than r 303 * Tries to merge l and r: l should be lower than r