From cd575ddf57af004913ff5a994aa5f3203216fa68 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 1 Nov 2018 15:13:19 -0400 Subject: bcachefs: Erasure coding Signed-off-by: Kent Overstreet --- fs/bcachefs/journal_io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/bcachefs/journal_io.c') diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index b1f6433cf9e9..6eea96ad03fb 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -1071,7 +1071,7 @@ static int journal_write_alloc(struct journal *j, struct journal_buf *w, replicas = bch2_extent_nr_ptrs(e.c); rcu_read_lock(); - devs_sorted = bch2_wp_alloc_list(c, &j->wp, + devs_sorted = bch2_dev_alloc_list(c, &j->wp.stripe, &c->rw_devs[BCH_DATA_JOURNAL]); for (i = 0; i < devs_sorted.nr; i++) { @@ -1098,8 +1098,7 @@ static int journal_write_alloc(struct journal *j, struct journal_buf *w, sectors > ca->mi.bucket_size) continue; - j->wp.next_alloc[ca->dev_idx] += U32_MAX; - bch2_wp_rescale(c, ca, &j->wp); + bch2_dev_stripe_increment(c, ca, &j->wp.stripe); ja->sectors_free = ca->mi.bucket_size - sectors; ja->cur_idx = (ja->cur_idx + 1) % ja->nr; -- cgit v1.2.3