From 31c85f9d68ee9da315ef5ac971727ae3cdb27dd0 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 13 Mar 2018 16:00:45 -0400 Subject: bcachefs: journalling code now understands durability --- fs/bcachefs/journal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 5a7266b1ae43..90212fb03e0a 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -2111,6 +2111,9 @@ static int journal_write_alloc(struct journal *j, struct journal_buf *w, if (!ca) continue; + if (!ca->mi.durability) + continue; + ja = &ca->journal; if (!ja->nr) continue; @@ -2140,7 +2143,8 @@ static int journal_write_alloc(struct journal *j, struct journal_buf *w, ja->buckets[ja->cur_idx]), .dev = ca->dev_idx, }); - replicas++; + + replicas += ca->mi.durability; } rcu_read_unlock(); -- cgit v1.2.3