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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2766876d5d
commit
494036d862
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user