Lines Matching refs:bio
36 #include <linux/bio.h>
63 struct bio *bio;
69 static void __read_end_io(struct bio *bio)
73 bio_for_each_folio_all(fi, bio) {
76 if (bio->bi_status)
82 if (bio->bi_private)
83 mempool_free(bio->bi_private, bio_post_read_ctx_pool);
84 bio_put(bio);
93 struct bio *bio = ctx->bio;
95 if (fscrypt_decrypt_bio(bio))
98 __read_end_io(bio);
105 struct bio *bio = ctx->bio;
116 bio->bi_private = NULL;
118 fsverity_verify_bio(bio);
120 __read_end_io(bio);
148 __read_end_io(ctx->bio);
152 static bool bio_post_read_required(struct bio *bio)
154 return bio->bi_private && !bio->bi_status;
169 static void mpage_end_io(struct bio *bio)
171 if (bio_post_read_required(bio)) {
172 struct bio_post_read_ctx *ctx = bio->bi_private;
178 __read_end_io(bio);
187 static void ext4_set_bio_post_read_ctx(struct bio *bio,
204 ctx->bio = bio;
206 bio->bi_private = ctx;
221 struct bio *bio = NULL;
351 if (bio && (last_block_in_bio != blocks[0] - 1 ||
352 !fscrypt_mergeable_bio(bio, inode, next_block))) {
354 submit_bio(bio);
355 bio = NULL;
357 if (bio == NULL) {
359 * bio_alloc will _always_ be able to allocate a bio if
362 bio = bio_alloc(bdev, bio_max_segs(nr_pages),
364 fscrypt_set_bio_crypt_ctx(bio, inode, next_block,
366 ext4_set_bio_post_read_ctx(bio, inode, folio->index);
367 bio->bi_iter.bi_sector = blocks[0] << (blkbits - 9);
368 bio->bi_end_io = mpage_end_io;
370 bio->bi_opf |= REQ_RAHEAD;
374 if (!bio_add_folio(bio, folio, length, 0))
380 submit_bio(bio);
381 bio = NULL;
386 if (bio) {
387 submit_bio(bio);
388 bio = NULL;
397 if (bio)
398 submit_bio(bio);