Lines Matching refs:bio
33 static int copy_bio_to_actor(struct bio *bio, in copy_bio_to_actor() argument
43 if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all))) in copy_bio_to_actor()
66 if (!bio_next_segment(bio, &iter_all)) in copy_bio_to_actor()
76 struct bio **biop, int *block_offset) in squashfs_bio_read()
87 struct bio *bio; in squashfs_bio_read() local
90 bio = bio_alloc(GFP_NOIO, page_count); in squashfs_bio_read()
92 bio = bio_kmalloc(GFP_NOIO, page_count); in squashfs_bio_read()
94 if (!bio) in squashfs_bio_read()
97 bio_set_dev(bio, sb->s_bdev); in squashfs_bio_read()
98 bio->bi_opf = READ; in squashfs_bio_read()
99 bio->bi_iter.bi_sector = block * (msblk->devblksize >> SECTOR_SHIFT); in squashfs_bio_read()
110 if (!bio_add_page(bio, page, len, offset)) { in squashfs_bio_read()
118 error = submit_bio_wait(bio); in squashfs_bio_read()
122 *biop = bio; in squashfs_bio_read()
127 bio_free_pages(bio); in squashfs_bio_read()
128 bio_put(bio); in squashfs_bio_read()
145 struct bio *bio = NULL; in squashfs_read_data() local
170 res = squashfs_bio_read(sb, index, 2, &bio, &offset); in squashfs_read_data()
174 if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all))) { in squashfs_read_data()
184 if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all))) { in squashfs_read_data()
191 bio_free_pages(bio); in squashfs_read_data()
192 bio_put(bio); in squashfs_read_data()
210 res = squashfs_bio_read(sb, index, length, &bio, &offset); in squashfs_read_data()
219 res = squashfs_decompress(msblk, bio, offset, length, output); in squashfs_read_data()
221 res = copy_bio_to_actor(bio, output, offset, length); in squashfs_read_data()
225 bio_free_pages(bio); in squashfs_read_data()
226 bio_put(bio); in squashfs_read_data()