summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/bcachefs_format.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2024-04-14 22:25:18 +0200
committerIngo Molnar <mingo@kernel.org>2024-04-14 22:25:18 +0200
commitd0331aa9789707140e938d14629c200b32ae1d0f (patch)
tree744a6b6d34f242e122bf78ca9f3a95c1548907a3 /fs/bcachefs/bcachefs_format.h
parentperf/bpf: Change the !CONFIG_BPF_SYSCALL stubs to static inlines (diff)
parentMerge tag 'pull-sysfs-annotation-fix' of git://git.kernel.org/pub/scm/linux/k... (diff)
downloadlinux-d0331aa9789707140e938d14629c200b32ae1d0f.tar.xz
linux-d0331aa9789707140e938d14629c200b32ae1d0f.zip
Merge branch 'linus' into perf/core, to pick up perf/urgent fixes
Pick up perf/urgent fixes that are upstream already, but not yet in the perf/core development branch. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/bcachefs/bcachefs_format.h')
-rw-r--r--fs/bcachefs/bcachefs_format.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h
index bff8750ac0d7..364ae42022af 100644
--- a/fs/bcachefs/bcachefs_format.h
+++ b/fs/bcachefs/bcachefs_format.h
@@ -818,6 +818,7 @@ struct bch_sb_field_ext {
struct bch_sb_field field;
__le64 recovery_passes_required[2];
__le64 errors_silent[8];
+ __le64 btrees_lost_data;
};
struct bch_sb_field_downgrade_entry {
@@ -1534,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 */