Lines Matching refs:bio

35 	struct bio	       *bio;  member
341 static void nilfs_end_bio_write(struct bio *bio) in nilfs_end_bio_write() argument
343 struct nilfs_segment_buffer *segbuf = bio->bi_private; in nilfs_end_bio_write()
345 if (bio->bi_error) in nilfs_end_bio_write()
348 bio_put(bio); in nilfs_end_bio_write()
355 struct bio *bio = wi->bio; in nilfs_segbuf_submit_bio() local
363 bio_put(bio); in nilfs_segbuf_submit_bio()
369 bio->bi_end_io = nilfs_end_bio_write; in nilfs_segbuf_submit_bio()
370 bio->bi_private = segbuf; in nilfs_segbuf_submit_bio()
371 submit_bio(mode, bio); in nilfs_segbuf_submit_bio()
374 wi->bio = NULL; in nilfs_segbuf_submit_bio()
381 wi->bio = NULL; in nilfs_segbuf_submit_bio()
394 static struct bio *nilfs_alloc_seg_bio(struct the_nilfs *nilfs, sector_t start, in nilfs_alloc_seg_bio()
397 struct bio *bio; in nilfs_alloc_seg_bio() local
399 bio = bio_alloc(GFP_NOIO, nr_vecs); in nilfs_alloc_seg_bio()
400 if (bio == NULL) { in nilfs_alloc_seg_bio()
401 while (!bio && (nr_vecs >>= 1)) in nilfs_alloc_seg_bio()
402 bio = bio_alloc(GFP_NOIO, nr_vecs); in nilfs_alloc_seg_bio()
404 if (likely(bio)) { in nilfs_alloc_seg_bio()
405 bio->bi_bdev = nilfs->ns_bdev; in nilfs_alloc_seg_bio()
406 bio->bi_iter.bi_sector = in nilfs_alloc_seg_bio()
409 return bio; in nilfs_alloc_seg_bio()
415 wi->bio = NULL; in nilfs_segbuf_prepare_write()
431 if (!wi->bio) { in nilfs_segbuf_submit_bh()
432 wi->bio = nilfs_alloc_seg_bio(wi->nilfs, wi->blocknr + wi->end, in nilfs_segbuf_submit_bh()
434 if (unlikely(!wi->bio)) in nilfs_segbuf_submit_bh()
438 len = bio_add_page(wi->bio, bh->b_page, bh->b_size, bh_offset(bh)); in nilfs_segbuf_submit_bh()
485 if (wi.bio) { in nilfs_segbuf_write()