summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/alloc_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-04 16:06:55 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:42 -0400
commitae10fe017bf54653a61a93e49fac1c3e2b474e20 (patch)
tree5e9be1ce96f93ae2fc7d7d430a0363d4cd387bc6 /fs/bcachefs/alloc_types.h
parent29cea6f4834b36f6a51832e08218e03b60002a9a (diff)
downloadlinux-stable-ae10fe017bf54653a61a93e49fac1c3e2b474e20.tar.gz
linux-stable-ae10fe017bf54653a61a93e49fac1c3e2b474e20.tar.bz2
linux-stable-ae10fe017bf54653a61a93e49fac1c3e2b474e20.zip
bcachefs: bucket_alloc_state
This refactoring puts our various allocation path counters into a dedicated struct - the upcoming nocow patch is going to add another counter. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_types.h')
-rw-r--r--fs/bcachefs/alloc_types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/alloc_types.h b/fs/bcachefs/alloc_types.h
index 5eed5ce67c57..2c96794d1993 100644
--- a/fs/bcachefs/alloc_types.h
+++ b/fs/bcachefs/alloc_types.h
@@ -8,6 +8,13 @@
#include "clock_types.h"
#include "fifo.h"
+struct bucket_alloc_state {
+ u64 buckets_seen;
+ u64 skipped_open;
+ u64 skipped_need_journal_commit;
+ u64 skipped_nouse;
+};
+
struct ec_bucket_buf;
#define BCH_ALLOC_RESERVES() \