Lines Matching refs:bio
16 void bch_bbio_free(struct bio *bio, struct cache_set *c) in bch_bbio_free() argument
18 struct bbio *b = container_of(bio, struct bbio, bio); in bch_bbio_free()
22 struct bio *bch_bbio_alloc(struct cache_set *c) in bch_bbio_alloc()
25 struct bio *bio = &b->bio; in bch_bbio_alloc() local
27 bio_init(bio); in bch_bbio_alloc()
28 bio->bi_flags |= BIO_POOL_NONE << BIO_POOL_OFFSET; in bch_bbio_alloc()
29 bio->bi_max_vecs = bucket_pages(c); in bch_bbio_alloc()
30 bio->bi_io_vec = 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->bi_bdev = PTR_CACHE(c, &b->key, 0)->bdev; in __bch_submit_bbio()
43 closure_bio_submit(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()
51 __bch_submit_bbio(bio, c); in bch_submit_bbio()
108 void bch_bbio_count_io_errors(struct cache_set *c, struct bio *bio, in bch_bbio_count_io_errors() argument
111 struct bbio *b = container_of(bio, struct bbio, bio); in bch_bbio_count_io_errors()
114 unsigned threshold = bio->bi_rw & REQ_WRITE in bch_bbio_count_io_errors()
137 void bch_bbio_endio(struct cache_set *c, struct bio *bio, in bch_bbio_endio() argument
140 struct closure *cl = bio->bi_private; in bch_bbio_endio()
142 bch_bbio_count_io_errors(c, bio, error, m); in bch_bbio_endio()
143 bio_put(bio); in bch_bbio_endio()