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, bio->bi_inline_vecs, meta_bucket_pages(&c->cache->sb)); in bch_bbio_alloc()
31 return bio; in bch_bbio_alloc()
34 void __bch_submit_bbio(struct bio *bio, struct cache_set *c) in __bch_submit_bbio() argument
36 struct bbio *b = container_of(bio, struct bbio, bio); in __bch_submit_bbio()
38 bio->bi_iter.bi_sector = PTR_OFFSET(&b->key, 0); in __bch_submit_bbio()
39 bio_set_dev(bio, PTR_CACHE(c, &b->key, 0)->bdev); in __bch_submit_bbio()
42 closure_bio_submit(c, bio, bio->bi_private); in __bch_submit_bbio()
45 void bch_submit_bbio(struct bio *bio, struct cache_set *c, in bch_submit_bbio() argument
48 struct bbio *b = container_of(bio, struct bbio, bio); in bch_submit_bbio()
51 __bch_submit_bbio(bio, c); in bch_submit_bbio()
55 void bch_count_backing_io_errors(struct cached_dev *dc, struct bio *bio) in bch_count_backing_io_errors() argument
67 if (bio->bi_opf & REQ_RAHEAD) { in bch_count_backing_io_errors()
136 void bch_bbio_count_io_errors(struct cache_set *c, struct bio *bio, in bch_bbio_count_io_errors() argument
139 struct bbio *b = container_of(bio, struct bbio, bio); in bch_bbio_count_io_errors()
141 int is_read = (bio_data_dir(bio) == READ ? 1 : 0); in bch_bbio_count_io_errors()
143 unsigned int threshold = op_is_write(bio_op(bio)) in bch_bbio_count_io_errors()
166 void bch_bbio_endio(struct cache_set *c, struct bio *bio, in bch_bbio_endio() argument
169 struct closure *cl = bio->bi_private; in bch_bbio_endio()
171 bch_bbio_count_io_errors(c, bio, error, m); in bch_bbio_endio()
172 bio_put(bio); in bch_bbio_endio()