summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/alloc_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-06-27 17:32:38 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:05 -0400
commitec14fc6010fdcc40e54e289afc657a676ce93e72 (patch)
treee8fba04ba538c638d926763706411559a43016a6 /fs/bcachefs/alloc_types.h
parent494036d862dfff1de9782492692da225479b7146 (diff)
downloadlinux-stable-ec14fc6010fdcc40e54e289afc657a676ce93e72.tar.gz
linux-stable-ec14fc6010fdcc40e54e289afc657a676ce93e72.tar.bz2
linux-stable-ec14fc6010fdcc40e54e289afc657a676ce93e72.zip
bcachefs: Kill JOURNAL_WATERMARK
This unifies JOURNAL_WATERMARK with BCH_WATERMARK; we're working towards specifying watermarks once in the transaction commit path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_types.h')
-rw-r--r--fs/bcachefs/alloc_types.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/bcachefs/alloc_types.h b/fs/bcachefs/alloc_types.h
index ddcaf0631a8b..c33a29954e59 100644
--- a/fs/bcachefs/alloc_types.h
+++ b/fs/bcachefs/alloc_types.h
@@ -17,12 +17,12 @@ struct bucket_alloc_state {
};
#define BCH_WATERMARKS() \
- x(reclaim) \
- x(btree_copygc) \
- x(btree) \
- x(copygc) \
+ x(stripe) \
x(normal) \
- x(stripe)
+ x(copygc) \
+ x(btree) \
+ x(btree_copygc) \
+ x(reclaim)
enum bch_watermark {
#define x(name) BCH_WATERMARK_##name,
@@ -31,6 +31,9 @@ enum bch_watermark {
BCH_WATERMARK_NR,
};
+#define BCH_WATERMARK_BITS 3
+#define BCH_WATERMARK_MASK ~(~0 << BCH_WATERMARK_BITS)
+
#define OPEN_BUCKETS_COUNT 1024
#define WRITE_POINT_HASH_NR 32