diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-01-31 02:58:43 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:49 +0200 |
commit | 19a614d2e4beed7faf52ab95cb48ce38a3c38c04 (patch) | |
tree | 2b2a71e8adaae57def4d6cd93f3628cd8fbc8573 /fs/bcachefs/bcachefs_format.h | |
parent | bcachefs: Improve btree_reserve_get_fail tracepoint (diff) | |
download | linux-19a614d2e4beed7faf52ab95cb48ce38a3c38c04.tar.xz linux-19a614d2e4beed7faf52ab95cb48ce38a3c38c04.zip |
bcachefs: Better inlining for bch2_alloc_to_v4_mut
This separates out the slowpath into a separate function, and inlines
bch2_alloc_v4_mut into bch2_trans_start_alloc_update(), the main place
it's called.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs_format.h')
-rw-r--r-- | fs/bcachefs/bcachefs_format.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h index 6ee9321e7d21..d96efc8338d5 100644 --- a/fs/bcachefs/bcachefs_format.h +++ b/fs/bcachefs/bcachefs_format.h @@ -934,6 +934,9 @@ struct bch_alloc_v4 { struct bpos backpointers[0]; } __packed __aligned(8); +#define BCH_ALLOC_V4_U64s_V0 6 +#define BCH_ALLOC_V4_U64s (sizeof(struct bch_alloc_v4) / sizeof(u64)) + LE32_BITMASK(BCH_ALLOC_V3_NEED_DISCARD,struct bch_alloc_v3, flags, 0, 1) LE32_BITMASK(BCH_ALLOC_V3_NEED_INC_GEN,struct bch_alloc_v3, flags, 1, 2) |