]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bcachefs: ONLY_SPECIFIED_DEVS doesn't mean ignore durability anymore
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 29 Nov 2023 00:47:26 +0000 (19:47 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:39 +0000 (11:47 -0500)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_foreground.c

index 0e615798260721c3f84a0e217a0105fbdcd2b198..a7e6554cc7dd3a2fecfd3d27ccf2f258a7da5aad 100644 (file)
@@ -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);