summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-03-13 16:00:45 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2018-05-22 00:44:18 -0400
commit31c85f9d68ee9da315ef5ac971727ae3cdb27dd0 (patch)
tree444e59852101f21b9950854136e9c95f44dc2c02
parent755a5af51fd69850b1c6fc380e173b081986b4a0 (diff)
bcachefs: journalling code now understands durability
-rw-r--r--fs/bcachefs/journal.c6
1 files changed, 5 insertions, 1 deletions
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();