diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-03-13 16:00:45 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-03-13 16:00:45 -0400 |
commit | b3b7a19f86e1bfb7cdcbb70e845b5fc82d53c94c (patch) | |
tree | 7308f9cf69e9c5a1309862f372cadcd26b147e44 | |
parent | f7ccf513908be42581e41b48b8b078a441a6a804 (diff) |
bcachefs: journalling code now understands durability
-rw-r--r-- | fs/bcachefs/journal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index ea8a6282ad26..e50007673e4a 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -2110,6 +2110,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; @@ -2139,7 +2142,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(); |