]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/io.c
Update bcachefs sources to 3913e0cac3 bcachefs: Journal space calculation fix
[bcachefs-tools-debian] / libbcachefs / io.c
index 9b6aece794f2c9cf3ec74fe633a69ac4a385696f..157b2a0fc58240a8ada5e0b2c15bc052ee736f25 100644 (file)
@@ -1439,7 +1439,7 @@ static void promote_start(struct promote_op *op, struct bch_read_bio *rbio)
        bch2_migrate_read_done(&op->write, rbio);
 
        closure_init(cl, NULL);
-       closure_call(&op->write.op.cl, bch2_write, c->wq, cl);
+       closure_call(&op->write.op.cl, bch2_write, c->btree_update_wq, cl);
        closure_return_with_destructor(cl, promote_done);
 }
 
@@ -1822,6 +1822,13 @@ static void __bch2_read_endio(struct work_struct *work)
        if (bch2_crc_cmp(csum, rbio->pick.crc.csum))
                goto csum_err;
 
+       /*
+        * XXX
+        * We need to rework the narrow_crcs path to deliver the read completion
+        * first, and then punt to a different workqueue, otherwise we're
+        * holding up reads while doing btree updates which is bad for memory
+        * reclaim.
+        */
        if (unlikely(rbio->narrow_crcs))
                bch2_rbio_narrow_crcs(rbio);