diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-15 20:53:30 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:50 +0300 |
commit | 8deed5f4e547e675cf8c1de88720c23c3c3093ca (patch) | |
tree | 2323bedef77f764633be4dd0b567f450a5f06404 /fs/bcachefs/alloc_foreground.c | |
parent | 2c40a2403e2b25aca38ba728385657dfca560a62 (diff) | |
download | linux-8deed5f4e547e675cf8c1de88720c23c3c3093ca.tar.xz |
bcachefs: Use separate new stripes for copygc and non-copygc
Allocations for copygc have to be kept separate from everything else,
so that copygc doesn't get starved.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index 1689e229164f..df9f022e6926 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -474,7 +474,9 @@ bucket_alloc_from_stripe(struct bch_fs *c, if (ec_open_bucket(c, ptrs)) return 0; - h = bch2_ec_stripe_head_get(c, target, 0, nr_replicas - 1, cl); + h = bch2_ec_stripe_head_get(c, target, 0, nr_replicas - 1, + wp == &c->copygc_write_point, + cl); if (IS_ERR(h)) return -PTR_ERR(h); if (!h) |