Lines Matching refs:bio
17 void bch_bbio_free(struct bio *bio, struct cache_set *c)
19 struct bbio *b = container_of(bio, struct bbio, bio);
24 struct bio *bch_bbio_alloc(struct cache_set *c)
27 struct bio *bio = &b->bio;
29 bio_init(bio, bio->bi_inline_vecs, meta_bucket_pages(&c->cache->sb));
31 return bio;
34 void __bch_submit_bbio(struct bio *bio, struct cache_set *c)
36 struct bbio *b = container_of(bio, struct bbio, bio);
38 bio->bi_iter.bi_sector = PTR_OFFSET(&b->key, 0);
39 bio_set_dev(bio, PTR_CACHE(c, &b->key, 0)->bdev);
42 closure_bio_submit(c, bio, bio->bi_private);
45 void bch_submit_bbio(struct bio *bio, struct cache_set *c,
48 struct bbio *b = container_of(bio, struct bbio, bio);
51 __bch_submit_bbio(bio, c);
55 void bch_count_backing_io_errors(struct cached_dev *dc, struct bio *bio)
65 * we shouldn't count failed REQ_RAHEAD bio to dc->io_errors.
67 if (bio->bi_opf & REQ_RAHEAD) {
136 void bch_bbio_count_io_errors(struct cache_set *c, struct bio *bio,
139 struct bbio *b = container_of(bio, struct bbio, bio);
141 int is_read = (bio_data_dir(bio) == READ ? 1 : 0);
143 unsigned int threshold = op_is_write(bio_op(bio))
166 void bch_bbio_endio(struct cache_set *c, struct bio *bio,
169 struct closure *cl = bio->bi_private;
171 bch_bbio_count_io_errors(c, bio, error, m);
172 bio_put(bio);