Lines Matching refs:bio
375 static void o2hb_bio_end_io(struct bio *bio, in o2hb_bio_end_io() argument
378 struct o2hb_bio_wait_ctxt *wc = bio->bi_private; in o2hb_bio_end_io()
386 bio_put(bio); in o2hb_bio_end_io()
391 static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg, in o2hb_setup_one_bio()
401 struct bio *bio; in o2hb_setup_one_bio() local
408 bio = bio_alloc(GFP_ATOMIC, 16); in o2hb_setup_one_bio()
409 if (!bio) { in o2hb_setup_one_bio()
411 bio = ERR_PTR(-ENOMEM); in o2hb_setup_one_bio()
416 bio->bi_iter.bi_sector = (reg->hr_start_block + cs) << (bits - 9); in o2hb_setup_one_bio()
417 bio->bi_bdev = reg->hr_bdev; in o2hb_setup_one_bio()
418 bio->bi_private = wc; in o2hb_setup_one_bio()
419 bio->bi_end_io = o2hb_bio_end_io; in o2hb_setup_one_bio()
432 len = bio_add_page(bio, page, vec_len, vec_start); in o2hb_setup_one_bio()
441 return bio; in o2hb_setup_one_bio()
450 struct bio *bio; in o2hb_read_slots() local
455 bio = o2hb_setup_one_bio(reg, &wc, ¤t_slot, max_slots); in o2hb_read_slots()
456 if (IS_ERR(bio)) { in o2hb_read_slots()
457 status = PTR_ERR(bio); in o2hb_read_slots()
463 submit_bio(READ, bio); in o2hb_read_slots()
481 struct bio *bio; in o2hb_issue_node_write() local
487 bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1); in o2hb_issue_node_write()
488 if (IS_ERR(bio)) { in o2hb_issue_node_write()
489 status = PTR_ERR(bio); in o2hb_issue_node_write()
495 submit_bio(WRITE_SYNC, bio); in o2hb_issue_node_write()