Commit 494036d8 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: BCH_WATERMARK_reclaim

Add another watermark for journal reclaim - this is needed for the next
patches, that unify BCH_WATERMARK with JOURNAL_WATERMARK.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 2766876d
......@@ -191,11 +191,13 @@ long bch2_bucket_alloc_new_fs(struct bch_dev *ca)
static inline unsigned open_buckets_reserved(enum bch_watermark watermark)
{
switch (watermark) {
case BCH_WATERMARK_reclaim:
return 0;
case BCH_WATERMARK_btree:
case BCH_WATERMARK_btree_copygc:
return 0;
case BCH_WATERMARK_copygc:
return OPEN_BUCKETS_COUNT / 4;
case BCH_WATERMARK_copygc:
return OPEN_BUCKETS_COUNT / 3;
default:
return OPEN_BUCKETS_COUNT / 2;
}
......
......@@ -17,6 +17,7 @@ struct bucket_alloc_state {
};
#define BCH_WATERMARKS() \
x(reclaim) \
x(btree_copygc) \
x(btree) \
x(copygc) \
......
......@@ -170,6 +170,7 @@ static inline u64 bch2_dev_buckets_reserved(struct bch_dev *ca, enum bch_waterma
reserved += ca->nr_btree_reserve;
fallthrough;
case BCH_WATERMARK_btree_copygc:
case BCH_WATERMARK_reclaim:
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment