diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-27 17:29:20 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:05 -0400 |
commit | 494036d862dfff1de9782492692da225479b7146 (patch) | |
tree | 9e056723d45792ab5c1621df755420d1e7a1f3a0 /fs/bcachefs/alloc_foreground.c | |
parent | 2766876d5d118abd59d14fbe5b31e7e208ea11f2 (diff) | |
download | linux-stable-494036d862dfff1de9782492692da225479b7146.tar.gz linux-stable-494036d862dfff1de9782492692da225479b7146.tar.bz2 linux-stable-494036d862dfff1de9782492692da225479b7146.zip |
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>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index c7db89b92dbf..0cc5e9f8d461 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -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; } |