Loading fs/bcachefs/ec.c +3 −7 Original line number Diff line number Diff line Loading @@ -476,14 +476,10 @@ static int get_stripe_key_trans(struct btree_trans *trans, u64 idx, return ret; } static int get_stripe_key(struct bch_fs *c, u64 idx, struct ec_stripe_buf *stripe) { return bch2_trans_run(c, get_stripe_key_trans(trans, idx, stripe)); } /* recovery read path: */ int bch2_ec_read_extent(struct bch_fs *c, struct bch_read_bio *rbio) int bch2_ec_read_extent(struct btree_trans *trans, struct bch_read_bio *rbio) { struct bch_fs *c = trans->c; struct ec_stripe_buf *buf; struct closure cl; struct bch_stripe *v; Loading @@ -498,7 +494,7 @@ int bch2_ec_read_extent(struct bch_fs *c, struct bch_read_bio *rbio) if (!buf) return -BCH_ERR_ENOMEM_ec_read_extent; ret = get_stripe_key(c, rbio->pick.ec.idx, buf); ret = lockrestart_do(trans, get_stripe_key_trans(trans, rbio->pick.ec.idx, buf)); if (ret) { bch_err_ratelimited(c, "error doing reconstruct read: error %i looking up stripe", ret); Loading fs/bcachefs/ec.h +1 −1 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ struct ec_stripe_head { struct ec_stripe_new *s; }; int bch2_ec_read_extent(struct bch_fs *, struct bch_read_bio *); int bch2_ec_read_extent(struct btree_trans *, struct bch_read_bio *); void *bch2_writepoint_ec_buf(struct bch_fs *, struct write_point *); Loading fs/bcachefs/io_read.c +1 −1 Original line number Diff line number Diff line Loading @@ -1025,7 +1025,7 @@ int __bch2_read_extent(struct btree_trans *trans, struct bch_read_bio *orig, 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; } Loading Loading
fs/bcachefs/ec.c +3 −7 Original line number Diff line number Diff line Loading @@ -476,14 +476,10 @@ static int get_stripe_key_trans(struct btree_trans *trans, u64 idx, return ret; } static int get_stripe_key(struct bch_fs *c, u64 idx, struct ec_stripe_buf *stripe) { return bch2_trans_run(c, get_stripe_key_trans(trans, idx, stripe)); } /* recovery read path: */ int bch2_ec_read_extent(struct bch_fs *c, struct bch_read_bio *rbio) int bch2_ec_read_extent(struct btree_trans *trans, struct bch_read_bio *rbio) { struct bch_fs *c = trans->c; struct ec_stripe_buf *buf; struct closure cl; struct bch_stripe *v; Loading @@ -498,7 +494,7 @@ int bch2_ec_read_extent(struct bch_fs *c, struct bch_read_bio *rbio) if (!buf) return -BCH_ERR_ENOMEM_ec_read_extent; ret = get_stripe_key(c, rbio->pick.ec.idx, buf); ret = lockrestart_do(trans, get_stripe_key_trans(trans, rbio->pick.ec.idx, buf)); if (ret) { bch_err_ratelimited(c, "error doing reconstruct read: error %i looking up stripe", ret); Loading
fs/bcachefs/ec.h +1 −1 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ struct ec_stripe_head { struct ec_stripe_new *s; }; int bch2_ec_read_extent(struct bch_fs *, struct bch_read_bio *); int bch2_ec_read_extent(struct btree_trans *, struct bch_read_bio *); void *bch2_writepoint_ec_buf(struct bch_fs *, struct write_point *); Loading
fs/bcachefs/io_read.c +1 −1 Original line number Diff line number Diff line Loading @@ -1025,7 +1025,7 @@ int __bch2_read_extent(struct btree_trans *trans, struct bch_read_bio *orig, 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; } Loading