summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-03-15 19:56:50 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2018-03-15 19:56:50 -0400
commit763d3217dbb046922d24d56ca1fcbc6a438ab494 (patch)
tree6f8b9b6bb693fd39a202feac79583a600bec27bf
parent2cf37974b349e2f5e6b1648f69e53066bf89bf54 (diff)
bcachefs: workaround an issue with writethrough caching
-rw-r--r--fs/bcachefs/alloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc.c b/fs/bcachefs/alloc.c
index a765120c8a4b..ede44f73b7b4 100644
--- a/fs/bcachefs/alloc.c
+++ b/fs/bcachefs/alloc.c
@@ -1253,7 +1253,9 @@ static enum bucket_alloc_ret __bch2_bucket_alloc_set(struct bch_fs *c,
if (!ca)
continue;
- if (have_cache_dev && !ca->mi.durability)
+ if (!ca->mi.durability &&
+ (have_cache_dev ||
+ wp->type != BCH_DATA_USER))
continue;
ob = bch2_bucket_alloc(c, ca, reserve,