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)
74 folio_end_read(fi.folio, bio->bi_status == 0);
75 if (bio->bi_private)
76 mempool_free(bio->bi_private, bio_post_read_ctx_pool);
77 bio_put(bio);
86 struct bio *bio = ctx->bio;
88 if (fscrypt_decrypt_bio(bio))
91 __read_end_io(bio);
98 struct bio *bio = ctx->bio;
109 bio->bi_private = NULL;
111 fsverity_verify_bio(bio);
113 __read_end_io(bio);
141 __read_end_io(ctx->bio);
145 static bool bio_post_read_required(struct bio *bio)
147 return bio->bi_private && !bio->bi_status;
162 static void mpage_end_io(struct bio *bio)
164 if (bio_post_read_required(bio)) {
165 struct bio_post_read_ctx *ctx = bio->bi_private;
171 __read_end_io(bio);
180 static void ext4_set_bio_post_read_ctx(struct bio *bio,
197 ctx->bio = bio;
199 bio->bi_private = ctx;
214 struct bio *bio = NULL;
343 if (bio && (last_block_in_bio != blocks[0] - 1 ||
344 !fscrypt_mergeable_bio(bio, inode, next_block))) {
346 submit_bio(bio);
347 bio = NULL;
349 if (bio == NULL) {
351 * bio_alloc will _always_ be able to allocate a bio if
354 bio = bio_alloc(bdev, bio_max_segs(nr_pages),
356 fscrypt_set_bio_crypt_ctx(bio, inode, next_block,
358 ext4_set_bio_post_read_ctx(bio, inode, folio->index);
359 bio->bi_iter.bi_sector = blocks[0] << (blkbits - 9);
360 bio->bi_end_io = mpage_end_io;
362 bio->bi_opf |= REQ_RAHEAD;
366 if (!bio_add_folio(bio, folio, length, 0))
372 submit_bio(bio);
373 bio = NULL;
378 if (bio) {
379 submit_bio(bio);
380 bio = NULL;
389 if (bio)
390 submit_bio(bio);