From 763d3217dbb046922d24d56ca1fcbc6a438ab494 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 15 Mar 2018 19:56:50 -0400 Subject: bcachefs: workaround an issue with writethrough caching --- fs/bcachefs/alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3