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-05-22 00:44:18 -0400
commit619e80e6da64b1ba08e92fcc4ce8536e4f74c8c5 (patch)
tree60a860f2c18481e3548356a10138b89f1fabcb47
parent6a562e05c5a6613e6c3d99a2b1f28be47455614d (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,