Lines Matching defs:bio
26 #include "bio.h"
254 if (WARN_ON_ONCE(bbio->bio.bi_iter.bi_size != eb->len))
3635 static void btrfs_end_super_write(struct bio *bio)
3637 struct btrfs_device *device = bio->bi_private;
3642 bio_for_each_segment_all(bvec, bio, iter_all) {
3645 if (bio->bi_status) {
3649 blk_status_to_errno(bio->bi_status));
3662 bio_put(bio);
3772 struct bio *bio;
3817 bio = bio_alloc(device->bdev, 1,
3820 bio->bi_iter.bi_sector = bytenr >> SECTOR_SHIFT;
3821 bio->bi_private = device;
3822 bio->bi_end_io = btrfs_end_super_write;
3823 __bio_add_page(bio, page, BTRFS_SUPER_INFO_SIZE,
3832 bio->bi_opf |= REQ_FUA;
3834 btrfsic_check_bio(bio);
3835 submit_bio(bio);
3914 static void btrfs_end_empty_barrier(struct bio *bio)
3916 bio_uninit(bio);
3917 complete(bio->bi_private);
3926 struct bio *bio = &device->flush_bio;
3932 * When a disk has write caching disabled, we skip submission of a bio
3936 * superblock that were not properly flushed. So don't skip the bio
3945 bio_init(bio, device->bdev, NULL, 0,
3947 bio->bi_end_io = btrfs_end_empty_barrier;
3949 bio->bi_private = &device->flush_wait;
3951 btrfsic_check_bio(bio);
3952 submit_bio(bio);
3957 * If the flush bio has been submitted by write_dev_flush, wait for it.
3962 struct bio *bio = &device->flush_bio;
3969 if (bio->bi_status) {
3970 device->last_flush_error = bio->bi_status;