Lines Matching refs:bio
219 static void o2hb_bio_end_io(struct bio *bio, in o2hb_bio_end_io() argument
222 struct o2hb_bio_wait_ctxt *wc = bio->bi_private; in o2hb_bio_end_io()
230 bio_put(bio); in o2hb_bio_end_io()
235 static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg, in o2hb_setup_one_bio()
245 struct bio *bio; in o2hb_setup_one_bio() local
252 bio = bio_alloc(GFP_ATOMIC, 16); in o2hb_setup_one_bio()
253 if (!bio) { in o2hb_setup_one_bio()
255 bio = ERR_PTR(-ENOMEM); in o2hb_setup_one_bio()
260 bio->bi_sector = (reg->hr_start_block + cs) << (bits - 9); in o2hb_setup_one_bio()
261 bio->bi_bdev = reg->hr_bdev; in o2hb_setup_one_bio()
262 bio->bi_private = wc; in o2hb_setup_one_bio()
263 bio->bi_end_io = o2hb_bio_end_io; in o2hb_setup_one_bio()
276 len = bio_add_page(bio, page, vec_len, vec_start); in o2hb_setup_one_bio()
285 return bio; in o2hb_setup_one_bio()
294 struct bio *bio; in o2hb_read_slots() local
299 bio = o2hb_setup_one_bio(reg, &wc, ¤t_slot, max_slots); in o2hb_read_slots()
300 if (IS_ERR(bio)) { in o2hb_read_slots()
301 status = PTR_ERR(bio); in o2hb_read_slots()
307 submit_bio(READ, bio); in o2hb_read_slots()
325 struct bio *bio; in o2hb_issue_node_write() local
331 bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1); in o2hb_issue_node_write()
332 if (IS_ERR(bio)) { in o2hb_issue_node_write()
333 status = PTR_ERR(bio); in o2hb_issue_node_write()
339 submit_bio(WRITE, bio); in o2hb_issue_node_write()