Lines Matching refs:bio
41 static bool bio_phys_contig(struct bio *bio, struct bvec_iter start)
47 __bio_for_each_bvec(bv, bio, iter, start) {
59 static struct bbuf __bio_map_or_bounce(struct bch_fs *c, struct bio *bio,
72 if (!PageHighMem(bio_iter_page(bio, start)) &&
73 bio_phys_contig(bio, start))
75 .b = page_address(bio_iter_page(bio, start)) +
76 bio_iter_offset(bio, start),
81 __bio_for_each_segment(bv, bio, iter, start) {
102 __bio_for_each_segment(bv, bio, iter, start)
111 .b = data + bio_iter_offset(bio, start),
118 memcpy_from_bio(ret.b, bio, start);
123 static struct bbuf bio_map_or_bounce(struct bch_fs *c, struct bio *bio, int rw)
125 return __bio_map_or_bounce(c, bio, bio->bi_iter, rw);
152 static int __bio_uncompress(struct bch_fs *c, struct bio *src,
223 int bch2_bio_uncompress_inplace(struct bch_fs *c, struct bio *bio,
229 /* bio must own its pages: */
230 BUG_ON(!bio->bi_vcnt);
231 BUG_ON(DIV_ROUND_UP(crc->live_size, PAGE_SECTORS) > bio->bi_max_vecs);
241 if (__bio_uncompress(c, bio, data.b, *crc)) {
249 * XXX: don't have a good way to assert that the bio was allocated with
252 bio->bi_iter.bi_size = crc->live_size << 9;
254 memcpy_to_bio(bio, bio->bi_iter, data.b + (crc->offset << 9));
267 int bch2_bio_uncompress(struct bch_fs *c, struct bio *src,
268 struct bio *dst, struct bvec_iter dst_iter,
386 struct bio *dst, size_t *dst_len,
387 struct bio *src, size_t *src_len,
483 struct bio *dst, size_t *dst_len,
484 struct bio *src, size_t *src_len,