1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_BBPOS_TYPES_H
3 #define _BCACHEFS_BBPOS_TYPES_H
4 
5 struct bbpos {
6 	enum btree_id		btree;
7 	struct bpos		pos;
8 };
9 
BBPOS(enum btree_id btree,struct bpos pos)10 static inline struct bbpos BBPOS(enum btree_id btree, struct bpos pos)
11 {
12 	return (struct bbpos) { btree, pos };
13 }
14 
15 #define BBPOS_MIN	BBPOS(0, POS_MIN)
16 #define BBPOS_MAX	BBPOS(BTREE_ID_NR - 1, SPOS_MAX)
17 
18 #endif /* _BCACHEFS_BBPOS_TYPES_H */
19