summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-11-28 19:47:26 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-11-29 20:22:10 -0500
commitcd51fce06404ef8b6d91c2daf048e550366b543e (patch)
treedd19fc3ed4082e273620ae71e771e52cc70bf367
parente869e498670265bc6344af3338c6f113c46396be (diff)
bcachefs: ONLY_SPECIFIED_DEVS doesn't mean ignore durability anymore
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/alloc_foreground.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c
index 1ba0eeb7552a..a961df74d421 100644
--- a/fs/bcachefs/alloc_foreground.c
+++ b/fs/bcachefs/alloc_foreground.c
@@ -697,11 +697,9 @@ static int add_new_bucket(struct bch_fs *c,
bch_dev_bkey_exists(c, ob->dev)->mi.durability;
BUG_ON(*nr_effective >= nr_replicas);
- BUG_ON(flags & BCH_WRITE_ONLY_SPECIFIED_DEVS);
__clear_bit(ob->dev, devs_may_alloc->d);
- *nr_effective += (flags & BCH_WRITE_ONLY_SPECIFIED_DEVS)
- ? durability : 1;
+ *nr_effective += durability;
*have_cache |= !durability;
ob_push(c, ptrs, ob);