Linux 6.13-rc7
[linux.git] / fs / bcachefs / bbpos_types.h
blobf63893344f80aa721554ba3f95124cfc824edbee
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_BBPOS_TYPES_H
3 #define _BCACHEFS_BBPOS_TYPES_H
5 struct bbpos {
6 enum btree_id btree;
7 struct bpos pos;
8 };
10 static inline struct bbpos BBPOS(enum btree_id btree, struct bpos pos)
12 return (struct bbpos) { btree, pos };
15 #define BBPOS_MIN BBPOS(0, POS_MIN)
16 #define BBPOS_MAX BBPOS(BTREE_ID_NR - 1, SPOS_MAX)
18 #endif /* _BCACHEFS_BBPOS_TYPES_H */