From 8deed5f4e547e675cf8c1de88720c23c3c3093ca Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 15 Dec 2020 12:53:30 -0500 Subject: 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 Signed-off-by: Kent Overstreet --- fs/bcachefs/ec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/bcachefs/ec.h') diff --git a/fs/bcachefs/ec.h b/fs/bcachefs/ec.h index 3f1999bae6d4..97a263cf9c87 100644 --- a/fs/bcachefs/ec.h +++ b/fs/bcachefs/ec.h @@ -122,6 +122,7 @@ struct ec_stripe_head { unsigned target; unsigned algo; unsigned redundancy; + bool copygc; struct bch_devs_mask devs; unsigned nr_active_devs; @@ -147,7 +148,7 @@ int bch2_ec_stripe_new_alloc(struct bch_fs *, struct ec_stripe_head *); void bch2_ec_stripe_head_put(struct bch_fs *, struct ec_stripe_head *); struct ec_stripe_head *bch2_ec_stripe_head_get(struct bch_fs *, - unsigned, unsigned, unsigned, struct closure *); + unsigned, unsigned, unsigned, bool, struct closure *); void bch2_stripes_heap_update(struct bch_fs *, struct stripe *, size_t); void bch2_stripes_heap_del(struct bch_fs *, struct stripe *, size_t); -- cgit v1.2.3