Lines Matching refs:bio
102 struct bio bio; member
108 struct bio *bio = &io->bio; in dirty_init() local
110 bio_init(bio); in dirty_init()
112 bio_set_prio(bio, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)); in dirty_init()
114 bio->bi_iter.bi_size = KEY_SIZE(&w->key) << 9; in dirty_init()
115 bio->bi_max_vecs = DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS); in dirty_init()
116 bio->bi_private = w; in dirty_init()
117 bio->bi_io_vec = bio->bi_inline_vecs; in dirty_init()
118 bch_bio_map(bio, NULL); in dirty_init()
130 struct keybuf_key *w = io->bio.bi_private; in write_dirty_finish()
135 bio_for_each_segment_all(bv, &io->bio, i) in write_dirty_finish()
169 static void dirty_endio(struct bio *bio, int error) in dirty_endio() argument
171 struct keybuf_key *w = bio->bi_private; in dirty_endio()
183 struct keybuf_key *w = io->bio.bi_private; in write_dirty()
186 io->bio.bi_rw = WRITE; in write_dirty()
187 io->bio.bi_iter.bi_sector = KEY_START(&w->key); in write_dirty()
188 io->bio.bi_bdev = io->dc->bdev; in write_dirty()
189 io->bio.bi_end_io = dirty_endio; in write_dirty()
191 closure_bio_submit(&io->bio, cl, &io->dc->disk); in write_dirty()
196 static void read_dirty_endio(struct bio *bio, int error) in read_dirty_endio() argument
198 struct keybuf_key *w = bio->bi_private; in read_dirty_endio()
204 dirty_endio(bio, error); in read_dirty_endio()
211 closure_bio_submit(&io->bio, cl, &io->dc->disk); in read_dirty_submit()
256 io->bio.bi_iter.bi_sector = PTR_OFFSET(&w->key, 0); in read_dirty()
257 io->bio.bi_bdev = PTR_CACHE(dc->disk.c, in read_dirty()
259 io->bio.bi_rw = READ; in read_dirty()
260 io->bio.bi_end_io = read_dirty_endio; in read_dirty()
262 if (bio_alloc_pages(&io->bio, GFP_KERNEL)) in read_dirty()