Lines Matching refs:bio

361 	struct bio		*bio)  in xfs_end_bio()  argument
363 xfs_ioend_t *ioend = bio->bi_private; in xfs_end_bio()
366 ioend->io_error = bio->bi_error; in xfs_end_bio()
369 bio->bi_private = NULL; in xfs_end_bio()
370 bio->bi_end_io = NULL; in xfs_end_bio()
371 bio_put(bio); in xfs_end_bio()
380 struct bio *bio) in xfs_submit_ioend_bio() argument
383 bio->bi_private = ioend; in xfs_submit_ioend_bio()
384 bio->bi_end_io = xfs_end_bio; in xfs_submit_ioend_bio()
385 submit_bio(wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE, bio); in xfs_submit_ioend_bio()
388 STATIC struct bio *
392 struct bio *bio = bio_alloc(GFP_NOIO, BIO_MAX_PAGES); in xfs_alloc_ioend_bio() local
394 ASSERT(bio->bi_private == NULL); in xfs_alloc_ioend_bio()
395 bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); in xfs_alloc_ioend_bio()
396 bio->bi_bdev = bh->b_bdev; in xfs_alloc_ioend_bio()
397 return bio; in xfs_alloc_ioend_bio()
443 static inline int xfs_bio_add_buffer(struct bio *bio, struct buffer_head *bh) in xfs_bio_add_buffer() argument
445 return bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh)); in xfs_bio_add_buffer()
479 struct bio *bio; in xfs_submit_ioend() local
493 bio = NULL; in xfs_submit_ioend()
509 if (!bio) { in xfs_submit_ioend()
511 bio = xfs_alloc_ioend_bio(bh); in xfs_submit_ioend()
513 xfs_submit_ioend_bio(wbc, ioend, bio); in xfs_submit_ioend()
517 if (xfs_bio_add_buffer(bio, bh) != bh->b_size) { in xfs_submit_ioend()
518 xfs_submit_ioend_bio(wbc, ioend, bio); in xfs_submit_ioend()
524 if (bio) in xfs_submit_ioend()
525 xfs_submit_ioend_bio(wbc, ioend, bio); in xfs_submit_ioend()