Home
last modified time | relevance | path

Searched refs:bio (Results 1 – 25 of 69) sorted by relevance

123

/fs/ext4/
Dreadpage.c64 struct bio *bio; member
70 static void __read_end_io(struct bio *bio) in __read_end_io() argument
76 bio_for_each_segment_all(bv, bio, iter_all) { in __read_end_io()
79 if (bio->bi_status) in __read_end_io()
85 if (bio->bi_private) in __read_end_io()
86 mempool_free(bio->bi_private, bio_post_read_ctx_pool); in __read_end_io()
87 bio_put(bio); in __read_end_io()
96 struct bio *bio = ctx->bio; in decrypt_work() local
98 if (fscrypt_decrypt_bio(bio)) in decrypt_work()
101 __read_end_io(bio); in decrypt_work()
[all …]
Dpage-io.c100 static void ext4_finish_bio(struct bio *bio) in ext4_finish_bio() argument
105 bio_for_each_segment_all(bvec, bio, iter_all) { in ext4_finish_bio()
119 if (bio->bi_status) { in ext4_finish_bio()
137 if (bio->bi_status) { in ext4_finish_bio()
152 struct bio *bio, *next_bio; in ext4_release_io_end() local
158 for (bio = io_end->bio; bio; bio = next_bio) { in ext4_release_io_end()
159 next_bio = bio->bi_private; in ext4_release_io_end()
160 ext4_finish_bio(bio); in ext4_release_io_end()
161 bio_put(bio); in ext4_release_io_end()
324 static void ext4_end_bio(struct bio *bio) in ext4_end_bio() argument
[all …]
/fs/
Dmpage.c47 static void mpage_end_io(struct bio *bio) in mpage_end_io() argument
52 bio_for_each_segment_all(bv, bio, iter_all) { in mpage_end_io()
54 page_endio(page, bio_op(bio), in mpage_end_io()
55 blk_status_to_errno(bio->bi_status)); in mpage_end_io()
58 bio_put(bio); in mpage_end_io()
61 static struct bio *mpage_bio_submit(struct bio *bio) in mpage_bio_submit() argument
63 bio->bi_end_io = mpage_end_io; in mpage_bio_submit()
64 guard_bio_eod(bio); in mpage_bio_submit()
65 submit_bio(bio); in mpage_bio_submit()
115 struct bio *bio; member
[all …]
Ddirect-io.c71 struct bio *bio; /* bio under assembly */ member
136 struct bio *bio_list; /* singly linked via bi_private */
324 static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio);
329 static void dio_bio_end_aio(struct bio *bio) in dio_bio_end_aio() argument
331 struct dio *dio = bio->bi_private; in dio_bio_end_aio()
338 dio_bio_complete(dio, bio); in dio_bio_end_aio()
376 static void dio_bio_end_io(struct bio *bio) in dio_bio_end_io() argument
378 struct dio *dio = bio->bi_private; in dio_bio_end_io()
382 bio->bi_private = dio->bio_list; in dio_bio_end_io()
383 dio->bio_list = bio; in dio_bio_end_io()
[all …]
/fs/squashfs/
Dblock.c33 static int copy_bio_to_actor(struct bio *bio, in copy_bio_to_actor() argument
46 if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all))) in copy_bio_to_actor()
70 if (!bio_next_segment(bio, &iter_all)) in copy_bio_to_actor()
80 struct bio **biop, int *block_offset) in squashfs_bio_read()
91 struct bio *bio; in squashfs_bio_read() local
93 bio = bio_kmalloc(page_count, GFP_NOIO); in squashfs_bio_read()
94 if (!bio) in squashfs_bio_read()
96 bio_init(bio, sb->s_bdev, bio->bi_inline_vecs, page_count, REQ_OP_READ); in squashfs_bio_read()
97 bio->bi_iter.bi_sector = block * (msblk->devblksize >> SECTOR_SHIFT); in squashfs_bio_read()
108 if (!bio_add_page(bio, page, len, offset)) { in squashfs_bio_read()
[all …]
/fs/f2fs/
Diostat.h45 static inline void iostat_update_submit_ctx(struct bio *bio, in iostat_update_submit_ctx() argument
48 struct bio_iostat_ctx *iostat_ctx = bio->bi_private; in iostat_update_submit_ctx()
54 static inline struct bio_post_read_ctx *get_post_read_ctx(struct bio *bio) in get_post_read_ctx() argument
56 struct bio_iostat_ctx *iostat_ctx = bio->bi_private; in get_post_read_ctx()
61 extern void iostat_update_and_unbind_ctx(struct bio *bio);
63 struct bio *bio, struct bio_post_read_ctx *ctx);
71 static inline void iostat_update_and_unbind_ctx(struct bio *bio) {} in iostat_update_and_unbind_ctx() argument
73 struct bio *bio, struct bio_post_read_ctx *ctx) {} in iostat_alloc_and_bind_ctx() argument
74 static inline void iostat_update_submit_ctx(struct bio *bio, in iostat_update_submit_ctx() argument
76 static inline struct bio_post_read_ctx *get_post_read_ctx(struct bio *bio) in get_post_read_ctx() argument
[all …]
Ddata.c112 struct bio *bio; member
139 static void f2fs_finish_read_bio(struct bio *bio, bool in_task) in f2fs_finish_read_bio() argument
143 struct bio_post_read_ctx *ctx = bio->bi_private; in f2fs_finish_read_bio()
145 bio_for_each_segment_all(bv, bio, iter_all) { in f2fs_finish_read_bio()
156 if (bio->bi_status) in f2fs_finish_read_bio()
166 bio_put(bio); in f2fs_finish_read_bio()
173 struct bio *bio = ctx->bio; in f2fs_verify_bio() local
184 bio->bi_private = NULL; in f2fs_verify_bio()
194 bio_for_each_segment_all(bv, bio, iter_all) { in f2fs_verify_bio()
199 bio->bi_status = BLK_STS_IOERR; in f2fs_verify_bio()
[all …]
Diostat.c239 void iostat_update_and_unbind_ctx(struct bio *bio) in iostat_update_and_unbind_ctx() argument
241 struct bio_iostat_ctx *iostat_ctx = bio->bi_private; in iostat_update_and_unbind_ctx()
244 if (op_is_write(bio_op(bio))) { in iostat_update_and_unbind_ctx()
245 lat_type = bio->bi_opf & REQ_SYNC ? in iostat_update_and_unbind_ctx()
247 bio->bi_private = iostat_ctx->sbi; in iostat_update_and_unbind_ctx()
250 bio->bi_private = iostat_ctx->post_read_ctx; in iostat_update_and_unbind_ctx()
258 struct bio *bio, struct bio_post_read_ctx *ctx) in iostat_alloc_and_bind_ctx() argument
267 bio->bi_private = iostat_ctx; in iostat_alloc_and_bind_ctx()
/fs/crypto/
Dbio.c31 bool fscrypt_decrypt_bio(struct bio *bio) in fscrypt_decrypt_bio() argument
35 bio_for_each_folio_all(fi, bio) { in fscrypt_decrypt_bio()
40 bio->bi_status = errno_to_blk_status(err); in fscrypt_decrypt_bio()
54 struct bio *bio; in fscrypt_zeroout_range_inline_crypt() local
59 bio = bio_alloc(inode->i_sb->s_bdev, BIO_MAX_VECS, REQ_OP_WRITE, in fscrypt_zeroout_range_inline_crypt()
67 fscrypt_set_bio_crypt_ctx(bio, inode, lblk, GFP_NOFS); in fscrypt_zeroout_range_inline_crypt()
68 bio->bi_iter.bi_sector = in fscrypt_zeroout_range_inline_crypt()
71 ret = bio_add_page(bio, ZERO_PAGE(0), bytes_this_page, 0); in fscrypt_zeroout_range_inline_crypt()
81 !fscrypt_mergeable_bio(bio, inode, lblk)) { in fscrypt_zeroout_range_inline_crypt()
82 err = submit_bio_wait(bio); in fscrypt_zeroout_range_inline_crypt()
[all …]
Dinline_crypt.c303 void fscrypt_set_bio_crypt_ctx(struct bio *bio, const struct inode *inode, in fscrypt_set_bio_crypt_ctx() argument
310 bio_set_skip_dm_default_key(bio); in fscrypt_set_bio_crypt_ctx()
317 bio_crypt_set_ctx(bio, ci->ci_enc_key.blk_key, dun, gfp_mask); in fscrypt_set_bio_crypt_ctx()
355 void fscrypt_set_bio_crypt_ctx_bh(struct bio *bio, in fscrypt_set_bio_crypt_ctx_bh() argument
363 fscrypt_set_bio_crypt_ctx(bio, inode, first_lblk, gfp_mask); in fscrypt_set_bio_crypt_ctx_bh()
391 bool fscrypt_mergeable_bio(struct bio *bio, const struct inode *inode, in fscrypt_mergeable_bio() argument
394 const struct bio_crypt_ctx *bc = bio->bi_crypt_context; in fscrypt_mergeable_bio()
399 if (bio_should_skip_dm_default_key(bio) != in fscrypt_mergeable_bio()
414 return bio_crypt_dun_is_contiguous(bc, bio->bi_iter.bi_size, next_dun); in fscrypt_mergeable_bio()
428 bool fscrypt_mergeable_bio_bh(struct bio *bio, in fscrypt_mergeable_bio_bh() argument
[all …]
/fs/btrfs/
Draid56.c70 static int fail_bio_stripe(struct btrfs_raid_bio *rbio, struct bio *bio);
794 static void rbio_endio_bio_list(struct bio *cur, blk_status_t err) in rbio_endio_bio_list()
796 struct bio *next; in rbio_endio_bio_list()
813 struct bio *cur = bio_list_get(&rbio->bio_list); in rbio_orig_end_io()
814 struct bio *extra; in rbio_orig_end_io()
844 static void raid_write_end_io(struct bio *bio) in raid_write_end_io() argument
846 struct btrfs_raid_bio *rbio = bio->bi_private; in raid_write_end_io()
847 blk_status_t err = bio->bi_status; in raid_write_end_io()
851 fail_bio_stripe(rbio, bio); in raid_write_end_io()
853 bio_put(bio); in raid_write_end_io()
[all …]
Dcompression.c177 blk_status_t status = bbio->bio.bi_status; in end_compressed_bio_read()
210 bio_put(&bbio->bio); in end_compressed_bio_read()
304 if (bbio->bio.bi_status) in end_compressed_bio_write()
305 cb->status = bbio->bio.bi_status; in end_compressed_bio_write()
310 btrfs_record_physical_zoned(cb->inode, cb->start, &bbio->bio); in end_compressed_bio_write()
313 bio_put(&bbio->bio); in end_compressed_bio_write()
333 static struct bio *alloc_compressed_bio(struct compressed_bio *cb, u64 disk_bytenr, in alloc_compressed_bio()
341 struct bio *bio; in alloc_compressed_bio() local
344 bio = btrfs_bio_alloc(BIO_MAX_VECS, opf, endio_func, cb); in alloc_compressed_bio()
345 bio->bi_iter.bi_sector = disk_bytenr >> SECTOR_SHIFT; in alloc_compressed_bio()
[all …]
Draid56.h166 void raid56_parity_recover(struct bio *bio, struct btrfs_io_context *bioc,
168 void raid56_parity_write(struct bio *bio, struct btrfs_io_context *bioc);
173 struct btrfs_raid_bio *raid56_parity_alloc_scrub_rbio(struct bio *bio,
180 raid56_alloc_missing_rbio(struct bio *bio, struct btrfs_io_context *bioc);
Dvolumes.h159 struct bio flush_bio;
419 struct bio bio; member
422 static inline struct btrfs_bio *btrfs_bio(struct bio *bio) in btrfs_bio() argument
424 return container_of(bio, struct btrfs_bio, bio); in btrfs_bio()
430 struct bio *btrfs_bio_alloc(unsigned int nr_vecs, blk_opf_t opf,
432 struct bio *btrfs_bio_clone_partial(struct bio *orig, u64 offset, u64 size,
437 bbio->bio.bi_status = status; in btrfs_bio_end_io()
460 (((bvl) = bio_iter_iovec((&(bbio)->bio), (iter))), 1); \
462 bio_advance_iter_single(&(bbio)->bio, &(iter), \
501 struct bio *orig_bio;
[all …]
Dscrub.c84 struct bio *bio; member
376 static int bio_add_scrub_sector(struct bio *bio, struct scrub_sector *ssector, in bio_add_scrub_sector() argument
379 return bio_add_page(bio, scrub_sector_get_page(ssector), len, in bio_add_scrub_sector()
409 static void scrub_bio_end_io(struct bio *bio);
420 static void scrub_wr_bio_end_io(struct bio *bio);
716 bio_put(sbio->bio); in scrub_free_ctx()
1556 static void scrub_bio_wait_endio(struct bio *bio) in scrub_bio_wait_endio() argument
1558 complete(bio->bi_private); in scrub_bio_wait_endio()
1562 struct bio *bio, in scrub_submit_raid56_bio_wait() argument
1567 bio->bi_iter.bi_sector = (sector->offset + sector->sblock->logical) >> in scrub_submit_raid56_bio_wait()
[all …]
Dextent_io.c94 struct bio *bio; member
115 struct bio *bio; in submit_one_bio() local
120 if (!bio_ctrl->bio) in submit_one_bio()
123 bio = bio_ctrl->bio; in submit_one_bio()
124 bv = bio_first_bvec_all(bio); in submit_one_bio()
129 ASSERT(bio->bi_iter.bi_size); in submit_one_bio()
131 btrfs_bio(bio)->file_offset = page_offset(bv->bv_page) + bv->bv_offset; in submit_one_bio()
134 btrfs_submit_metadata_bio(inode, bio, mirror_num); in submit_one_bio()
135 else if (btrfs_op(bio) == BTRFS_MAP_WRITE) in submit_one_bio()
136 btrfs_submit_data_write_bio(inode, bio, mirror_num); in submit_one_bio()
[all …]
Dcheck-integrity.c277 static void btrfsic_bio_end_io(struct bio *bp);
1561 struct bio *bio; in btrfsic_read_block() local
1564 bio = bio_alloc(block_ctx->dev->bdev, num_pages - i, in btrfsic_read_block()
1566 bio->bi_iter.bi_sector = dev_bytenr >> 9; in btrfsic_read_block()
1569 ret = bio_add_page(bio, block_ctx->pagev[j], in btrfsic_read_block()
1578 if (submit_bio_wait(bio)) { in btrfsic_read_block()
1581 bio_put(bio); in btrfsic_read_block()
1584 bio_put(bio); in btrfsic_read_block()
1683 struct bio *bio, int *bio_is_patched, in btrfsic_process_written_block() argument
1843 if (NULL != bio) { in btrfsic_process_written_block()
[all …]
/fs/gfs2/
Dlops.c202 static void gfs2_end_log_write(struct bio *bio) in gfs2_end_log_write() argument
204 struct gfs2_sbd *sdp = bio->bi_private; in gfs2_end_log_write()
209 if (bio->bi_status) { in gfs2_end_log_write()
210 if (!cmpxchg(&sdp->sd_log_error, 0, (int)bio->bi_status)) in gfs2_end_log_write()
212 bio->bi_status, sdp->sd_jdesc->jd_jid); in gfs2_end_log_write()
219 bio_for_each_segment_all(bvec, bio, iter_all) { in gfs2_end_log_write()
222 gfs2_end_log_write_bh(sdp, bvec, bio->bi_status); in gfs2_end_log_write()
227 bio_put(bio); in gfs2_end_log_write()
241 void gfs2_log_submit_bio(struct bio **biop, blk_opf_t opf) in gfs2_log_submit_bio()
243 struct bio *bio = *biop; in gfs2_log_submit_bio() local
[all …]
Dmeta_io.c194 static void gfs2_meta_read_endio(struct bio *bio) in gfs2_meta_read_endio() argument
199 bio_for_each_segment_all(bvec, bio, iter_all) { in gfs2_meta_read_endio()
209 bh->b_end_io(bh, !bio->bi_status); in gfs2_meta_read_endio()
213 bio_put(bio); in gfs2_meta_read_endio()
224 struct bio *bio; in gfs2_submit_bhs() local
226 bio = bio_alloc(bh->b_bdev, num, opf, GFP_NOIO); in gfs2_submit_bhs()
227 bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); in gfs2_submit_bhs()
230 if (!bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh))) { in gfs2_submit_bhs()
231 BUG_ON(bio->bi_iter.bi_size == 0); in gfs2_submit_bhs()
237 bio->bi_end_io = gfs2_meta_read_endio; in gfs2_submit_bhs()
[all …]
/fs/iomap/
Ddirect-io.c44 struct bio *poll_bio;
54 static struct bio *iomap_dio_alloc_bio(const struct iomap_iter *iter, in iomap_dio_alloc_bio()
64 struct iomap_dio *dio, struct bio *bio, loff_t pos) in iomap_dio_submit_bio() argument
70 bio_set_polled(bio, dio->iocb); in iomap_dio_submit_bio()
71 dio->submit.poll_bio = bio; in iomap_dio_submit_bio()
75 dio->dops->submit_io(iter, bio, pos); in iomap_dio_submit_bio()
77 submit_bio(bio); in iomap_dio_submit_bio()
157 void iomap_dio_bio_end_io(struct bio *bio) in iomap_dio_bio_end_io() argument
159 struct iomap_dio *dio = bio->bi_private; in iomap_dio_bio_end_io()
162 if (bio->bi_status) in iomap_dio_bio_end_io()
[all …]
Dbuffered-io.c187 static void iomap_read_end_io(struct bio *bio) in iomap_read_end_io() argument
189 int error = blk_status_to_errno(bio->bi_status); in iomap_read_end_io()
192 bio_for_each_folio_all(fi, bio) in iomap_read_end_io()
194 bio_put(bio); in iomap_read_end_io()
200 struct bio *bio; member
288 if (!ctx->bio || in iomap_readpage_iter()
289 bio_end_sector(ctx->bio) != sector || in iomap_readpage_iter()
290 !bio_add_folio(ctx->bio, folio, plen, poff)) { in iomap_readpage_iter()
295 if (ctx->bio) in iomap_readpage_iter()
296 submit_bio(ctx->bio); in iomap_readpage_iter()
[all …]
/fs/nfs/blocklayout/
Dblocklayout.c104 static struct bio *
105 bl_submit_bio(struct bio *bio) in bl_submit_bio() argument
107 if (bio) { in bl_submit_bio()
108 get_parallel(bio->bi_private); in bl_submit_bio()
110 bio_op(bio) == READ ? "read" : "write", in bl_submit_bio()
111 bio->bi_iter.bi_size, in bl_submit_bio()
112 (unsigned long long)bio->bi_iter.bi_sector); in bl_submit_bio()
113 submit_bio(bio); in bl_submit_bio()
123 static struct bio *
124 do_add_page_to_bio(struct bio *bio, int npg, enum req_op op, sector_t isect, in do_add_page_to_bio() argument
[all …]
/fs/xfs/
Dxfs_bio_io.c24 struct bio *bio; in xfs_rw_bdev() local
29 bio = bio_alloc(bdev, bio_max_vecs(left), op | REQ_META | REQ_SYNC, in xfs_rw_bdev()
31 bio->bi_iter.bi_sector = sector; in xfs_rw_bdev()
38 while (bio_add_page(bio, page, len, off) != len) { in xfs_rw_bdev()
39 struct bio *prev = bio; in xfs_rw_bdev()
41 bio = bio_alloc(prev->bi_bdev, bio_max_vecs(left), in xfs_rw_bdev()
43 bio->bi_iter.bi_sector = bio_end_sector(prev); in xfs_rw_bdev()
44 bio_chain(prev, bio); in xfs_rw_bdev()
53 error = submit_bio_wait(bio); in xfs_rw_bdev()
54 bio_put(bio); in xfs_rw_bdev()
/fs/jfs/
Djfs_metapage.c267 static void metapage_read_end_io(struct bio *bio) in metapage_read_end_io() argument
269 struct page *page = bio->bi_private; in metapage_read_end_io()
271 if (bio->bi_status) { in metapage_read_end_io()
277 bio_put(bio); in metapage_read_end_io()
322 static void metapage_write_end_io(struct bio *bio) in metapage_write_end_io() argument
324 struct page *page = bio->bi_private; in metapage_write_end_io()
328 if (bio->bi_status) { in metapage_write_end_io()
333 bio_put(bio); in metapage_write_end_io()
338 struct bio *bio = NULL; in metapage_writepage() local
383 if (bio) { in metapage_writepage()
[all …]
/fs/nilfs2/
Dsegbuf.c22 struct bio *bio; member
334 static void nilfs_end_bio_write(struct bio *bio) in nilfs_end_bio_write() argument
336 struct nilfs_segment_buffer *segbuf = bio->bi_private; in nilfs_end_bio_write()
338 if (bio->bi_status) in nilfs_end_bio_write()
341 bio_put(bio); in nilfs_end_bio_write()
348 struct bio *bio = wi->bio; in nilfs_segbuf_submit_bio() local
350 bio->bi_end_io = nilfs_end_bio_write; in nilfs_segbuf_submit_bio()
351 bio->bi_private = segbuf; in nilfs_segbuf_submit_bio()
352 submit_bio(bio); in nilfs_segbuf_submit_bio()
355 wi->bio = NULL; in nilfs_segbuf_submit_bio()
[all …]

123