Lines Matching refs:bio

17 void bch_bbio_free(struct bio *bio, struct cache_set *c)  in bch_bbio_free()  argument
19 struct bbio *b = container_of(bio, struct bbio, bio); in bch_bbio_free()
24 struct bio *bch_bbio_alloc(struct cache_set *c) in bch_bbio_alloc()
27 struct bio *bio = &b->bio; in bch_bbio_alloc() local
29 bio_init(bio, NULL, bio->bi_inline_vecs, in bch_bbio_alloc()
32 return bio; in bch_bbio_alloc()
35 void __bch_submit_bbio(struct bio *bio, struct cache_set *c) in __bch_submit_bbio() argument
37 struct bbio *b = container_of(bio, struct bbio, bio); in __bch_submit_bbio()
39 bio->bi_iter.bi_sector = PTR_OFFSET(&b->key, 0); in __bch_submit_bbio()
40 bio_set_dev(bio, c->cache->bdev); in __bch_submit_bbio()
43 closure_bio_submit(c, bio, bio->bi_private); in __bch_submit_bbio()
46 void bch_submit_bbio(struct bio *bio, struct cache_set *c, in bch_submit_bbio() argument
49 struct bbio *b = container_of(bio, struct bbio, bio); in bch_submit_bbio()
52 __bch_submit_bbio(bio, c); in bch_submit_bbio()
56 void bch_count_backing_io_errors(struct cached_dev *dc, struct bio *bio) in bch_count_backing_io_errors() argument
68 if (bio->bi_opf & REQ_RAHEAD) { in bch_count_backing_io_errors()
137 void bch_bbio_count_io_errors(struct cache_set *c, struct bio *bio, in bch_bbio_count_io_errors() argument
140 struct bbio *b = container_of(bio, struct bbio, bio); in bch_bbio_count_io_errors()
142 int is_read = (bio_data_dir(bio) == READ ? 1 : 0); in bch_bbio_count_io_errors()
144 unsigned int threshold = op_is_write(bio_op(bio)) in bch_bbio_count_io_errors()
167 void bch_bbio_endio(struct cache_set *c, struct bio *bio, in bch_bbio_endio() argument
170 struct closure *cl = bio->bi_private; in bch_bbio_endio()
172 bch_bbio_count_io_errors(c, bio, error, m); in bch_bbio_endio()
173 bio_put(bio); in bch_bbio_endio()