linux/fs/bcachefs/bkey_sort.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_BKEY_SORT_H
#define _BCACHEFS_BKEY_SORT_H

struct sort_iter {};

static inline void sort_iter_init(struct sort_iter *iter, struct btree *b, unsigned size)
{}

struct sort_iter_stack {};

static inline void sort_iter_stack_init(struct sort_iter_stack *iter, struct btree *b)
{}

static inline void sort_iter_add(struct sort_iter *iter,
				 struct bkey_packed *k,
				 struct bkey_packed *end)
{}

struct btree_nr_keys
bch2_key_sort_fix_overlapping(struct bch_fs *, struct bset *,
			      struct sort_iter *);

struct btree_nr_keys
bch2_sort_repack(struct bset *, struct btree *,
		 struct btree_node_iter *,
		 struct bkey_format *, bool);

unsigned bch2_sort_keys_keep_unwritten_whiteouts(struct bkey_packed *, struct sort_iter *);
unsigned bch2_sort_keys(struct bkey_packed *, struct sort_iter *);

#endif /* _BCACHEFS_BKEY_SORT_H */