diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 22:36:45 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-31 19:18:37 +0300 |
commit | d5eade93452bd1a892e2155e9bb723f04992bdac (patch) | |
tree | 2642da5698805104a8678fb49dd83da43cc8fa7b /fs/bcachefs/bbpos.h | |
parent | 633169035a7ccdfe3a9eba0202dc2135baa07c72 (diff) | |
download | linux-d5eade93452bd1a892e2155e9bb723f04992bdac.tar.xz |
bcachefs: move: convert to bbpos
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bbpos.h')
-rw-r--r-- | fs/bcachefs/bbpos.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/bcachefs/bbpos.h b/fs/bcachefs/bbpos.h index 0038bc28ba8c..be2edced5213 100644 --- a/fs/bcachefs/bbpos.h +++ b/fs/bcachefs/bbpos.h @@ -2,22 +2,10 @@ #ifndef _BCACHEFS_BBPOS_H #define _BCACHEFS_BBPOS_H +#include "bbpos_types.h" #include "bkey_methods.h" #include "btree_cache.h" -struct bbpos { - enum btree_id btree; - struct bpos pos; -}; - -static inline struct bbpos BBPOS(enum btree_id btree, struct bpos pos) -{ - return (struct bbpos) { btree, pos }; -} - -#define BBPOS_MIN BBPOS(0, POS_MIN) -#define BBPOS_MAX BBPOS(BTREE_ID_NR - 1, POS_MAX) - static inline int bbpos_cmp(struct bbpos l, struct bbpos r) { return cmp_int(l.btree, r.btree) ?: bpos_cmp(l.pos, r.pos); |