]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/io_write.c
Update bcachefs sources to c3e4d892b77b mean and variance: Promote to lib/math
[bcachefs-tools-debian] / libbcachefs / io_write.c
index d6bd8f788d3a7e35113847a3ac02557ecbcc0770..7c904f7d53f975a346ece464506194f02efcff9e 100644 (file)
@@ -403,8 +403,7 @@ void bch2_submit_wbio_replicas(struct bch_write_bio *wbio, struct bch_fs *c,
        BUG_ON(c->opts.nochanges);
 
        bkey_for_each_ptr(ptrs, ptr) {
-               BUG_ON(ptr->dev >= BCH_SB_MEMBERS_MAX ||
-                      !c->devs[ptr->dev]);
+               BUG_ON(!bch2_dev_exists2(c, ptr->dev));
 
                ca = bch_dev_bkey_exists(c, ptr->dev);