diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-09 00:49:39 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-09 00:53:14 -0400 |
| commit | 5ab4beb759c05c74fb385ac5ca0ade5d3db67975 (patch) | |
| tree | 8d24270f159c6e3d972a2604630646c4f68afe0c /fs/bcachefs/bcachefs_format.h | |
| parent | 359571c327a726d622786aef3833637dacfd5d38 (diff) | |
bcachefs: Don't scan for btree nodes when we can reconstruct
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 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h index 63102992d955..364ae42022af 100644 --- a/fs/bcachefs/bcachefs_format.h +++ b/fs/bcachefs/bcachefs_format.h @@ -1535,6 +1535,20 @@ enum btree_id { BTREE_ID_NR }; +static inline bool btree_id_is_alloc(enum btree_id id) +{ + switch (id) { + case BTREE_ID_alloc: + case BTREE_ID_backpointers: + case BTREE_ID_need_discard: + case BTREE_ID_freespace: + case BTREE_ID_bucket_gens: + return true; + default: + return false; + } +} + #define BTREE_MAX_DEPTH 4U /* Btree nodes */ |
