Lines Matching refs:bio

22 #include <linux/bio.h>
33 static int copy_bio_to_actor(struct bio *bio,
46 if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all)))
70 if (!bio_next_segment(bio, &iter_all))
79 static int squashfs_bio_read_cached(struct bio *fullbio,
87 struct bio *bio = NULL;
114 if (!bio || idx != end_idx) {
115 struct bio *new = bio_alloc_clone(bdev, fullbio,
118 if (bio) {
119 bio_trim(bio, start_idx * PAGE_SECTORS,
121 bio_chain(bio, new);
122 submit_bio(bio);
125 bio = new;
133 if (bio) {
134 bio_trim(bio, start_idx * PAGE_SECTORS,
136 err = submit_bio_wait(bio);
137 bio_put(bio);
190 struct bio **biop, int *block_offset)
202 struct bio *bio;
204 bio = bio_kmalloc(page_count, GFP_NOIO);
205 if (!bio)
207 bio_init(bio, sb->s_bdev, bio->bi_inline_vecs, page_count, REQ_OP_READ);
208 bio->bi_iter.bi_sector = block * (msblk->devblksize >> SECTOR_SHIFT);
229 __bio_add_page(bio, page, len, offset);
235 error = squashfs_bio_read_cached(bio, cache_mapping, index,
239 error = submit_bio_wait(bio);
243 *biop = bio;
248 bio_free_pages(bio);
249 bio_uninit(bio);
250 kfree(bio);
267 struct bio *bio = NULL;
292 res = squashfs_bio_read(sb, index, 2, &bio, &offset);
296 if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all))) {
306 if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all))) {
313 bio_free_pages(bio);
314 bio_uninit(bio);
315 kfree(bio);
333 res = squashfs_bio_read(sb, index, length, &bio, &offset);
342 res = msblk->thread_ops->decompress(msblk, bio, offset, length, output);
344 res = copy_bio_to_actor(bio, output, offset, length);
348 bio_free_pages(bio);
349 bio_uninit(bio);
350 kfree(bio);