Lines Matching refs:bio

12 static void erofs_readendio(struct bio *bio)  in erofs_readendio()  argument
15 blk_status_t err = bio->bi_status; in erofs_readendio()
18 bio_for_each_segment_all(bvec, bio, iter_all) { in erofs_readendio()
32 bio_put(bio); in erofs_readendio()
127 static inline struct bio *erofs_read_raw_page(struct bio *bio, in erofs_read_raw_page() argument
147 if (bio && in erofs_read_raw_page()
151 submit_bio(bio); in erofs_read_raw_page()
152 bio = NULL; in erofs_read_raw_page()
155 if (!bio) { in erofs_read_raw_page()
221 bio = bio_alloc(GFP_NOIO, nblocks); in erofs_read_raw_page()
223 bio->bi_end_io = erofs_readendio; in erofs_read_raw_page()
224 bio_set_dev(bio, sb->s_bdev); in erofs_read_raw_page()
225 bio->bi_iter.bi_sector = (sector_t)blknr << in erofs_read_raw_page()
227 bio->bi_opf = REQ_OP_READ; in erofs_read_raw_page()
230 err = bio_add_page(bio, page, PAGE_SIZE, 0); in erofs_read_raw_page()
238 if (bio->bi_iter.bi_size >= bio->bi_max_vecs * PAGE_SIZE) { in erofs_read_raw_page()
244 return bio; in erofs_read_raw_page()
256 if (bio) in erofs_read_raw_page()
258 submit_bio(bio); in erofs_read_raw_page()
269 struct bio *bio; in erofs_raw_access_readpage() local
273 bio = erofs_read_raw_page(NULL, page->mapping, in erofs_raw_access_readpage()
276 if (IS_ERR(bio)) in erofs_raw_access_readpage()
277 return PTR_ERR(bio); in erofs_raw_access_readpage()
279 DBG_BUGON(bio); /* since we have only one bio -- must be NULL */ in erofs_raw_access_readpage()
289 struct bio *bio = NULL; in erofs_raw_access_readpages() local
302 bio = erofs_read_raw_page(bio, mapping, page, in erofs_raw_access_readpages()
306 if (IS_ERR(bio)) { in erofs_raw_access_readpages()
311 bio = NULL; in erofs_raw_access_readpages()
321 if (bio) in erofs_raw_access_readpages()
322 submit_bio(bio); in erofs_raw_access_readpages()