]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/io_read.c
improve kmalloc performance
[bcachefs-tools-debian] / libbcachefs / io_read.c
index 443c3ea655271efc649bb425d752ef9d447f4dd4..b833409c7865b766c79ffeaa4d7b10910be5095e 100644 (file)
@@ -526,7 +526,7 @@ out:
 
 static noinline void bch2_rbio_narrow_crcs(struct bch_read_bio *rbio)
 {
-       bch2_trans_do(rbio->c, NULL, NULL, BTREE_INSERT_NOFAIL,
+       bch2_trans_do(rbio->c, NULL, NULL, BCH_TRANS_COMMIT_no_enospc,
                      __bch2_rbio_narrow_crcs(trans, rbio));
 }
 
@@ -643,7 +643,7 @@ csum_err:
                "data checksum error: expected %0llx:%0llx got %0llx:%0llx (type %s)",
                rbio->pick.crc.csum.hi, rbio->pick.crc.csum.lo,
                csum.hi, csum.lo, bch2_csum_types[crc.csum_type]);
-       bch2_io_error(ca);
+       bch2_io_error(ca, BCH_MEMBER_ERROR_checksum);
        bch2_rbio_error(rbio, READ_RETRY_AVOID, BLK_STS_IOERR);
        goto out;
 decompression_err:
@@ -677,7 +677,7 @@ static void bch2_read_endio(struct bio *bio)
        if (!rbio->split)
                rbio->bio.bi_end_io = rbio->end_io;
 
-       if (bch2_dev_inum_io_err_on(bio->bi_status, ca,
+       if (bch2_dev_inum_io_err_on(bio->bi_status, ca, BCH_MEMBER_ERROR_read,
                                    rbio->read_pos.inode,
                                    rbio->read_pos.offset,
                                    "data read error: %s",
@@ -1025,7 +1025,7 @@ get_bio:
                trans->notrace_relock_fail = true;
        } else {
                /* Attempting reconstruct read: */
-               if (bch2_ec_read_extent(c, rbio)) {
+               if (bch2_ec_read_extent(trans, rbio)) {
                        bch2_rbio_error(rbio, READ_RETRY_AVOID, BLK_STS_IOERR);
                        goto out;
                }