Lines Matching refs:bio
36 #include <linux/bio.h>
64 struct bio *bio;
70 static void __read_end_io(struct bio *bio)
76 bio_for_each_segment_all(bv, bio, iter_all) {
80 if (bio->bi_status || PageError(page)) {
89 if (bio->bi_private)
90 mempool_free(bio->bi_private, bio_post_read_ctx_pool);
91 bio_put(bio);
101 fscrypt_decrypt_bio(ctx->bio);
110 struct bio *bio = ctx->bio;
121 bio->bi_private = NULL;
123 fsverity_verify_bio(bio);
125 __read_end_io(bio);
153 __read_end_io(ctx->bio);
157 static bool bio_post_read_required(struct bio *bio)
159 return bio->bi_private && !bio->bi_status;
174 static void mpage_end_io(struct bio *bio)
176 if (bio_post_read_required(bio)) {
177 struct bio_post_read_ctx *ctx = bio->bi_private;
183 __read_end_io(bio);
192 static void ext4_set_bio_post_read_ctx(struct bio *bio,
209 ctx->bio = bio;
211 bio->bi_private = ctx;
227 struct bio *bio = NULL;
363 if (bio && (last_block_in_bio != blocks[0] - 1 ||
364 !fscrypt_mergeable_bio(bio, inode, next_block))) {
366 submit_bio(bio);
367 bio = NULL;
369 if (bio == NULL) {
371 * bio_alloc will _always_ be able to allocate a bio if
374 bio = bio_alloc(GFP_KERNEL,
376 fscrypt_set_bio_crypt_ctx(bio, inode, next_block,
378 ext4_set_bio_post_read_ctx(bio, inode, page->index);
379 bio_set_dev(bio, bdev);
380 bio->bi_iter.bi_sector = blocks[0] << (blkbits - 9);
381 bio->bi_end_io = mpage_end_io;
382 bio_set_op_attrs(bio, REQ_OP_READ,
387 if (bio_add_page(bio, page, length, 0) < length)
393 submit_bio(bio);
394 bio = NULL;
399 if (bio) {
400 submit_bio(bio);
401 bio = NULL;
411 if (bio)
412 submit_bio(bio);