Home
last modified time | relevance | path

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

12345678910>>...14

/kernel/linux/linux-5.10/include/linux/
Dbio.h24 #define bio_prio(bio) (bio)->bi_ioprio argument
25 #define bio_set_prio(bio, prio) ((bio)->bi_ioprio = prio) argument
27 #define bio_iter_iovec(bio, iter) \ argument
28 bvec_iter_bvec((bio)->bi_io_vec, (iter))
30 #define bio_iter_page(bio, iter) \ argument
31 bvec_iter_page((bio)->bi_io_vec, (iter))
32 #define bio_iter_len(bio, iter) \ argument
33 bvec_iter_len((bio)->bi_io_vec, (iter))
34 #define bio_iter_offset(bio, iter) \ argument
35 bvec_iter_offset((bio)->bi_io_vec, (iter))
[all …]
/kernel/linux/linux-5.10/block/
Dbio.c66 unsigned int sz = sizeof(struct bio) + extra_size; in bio_find_or_create_slab()
235 void bio_uninit(struct bio *bio) in bio_uninit() argument
238 if (bio->bi_blkg) { in bio_uninit()
239 blkg_put(bio->bi_blkg); in bio_uninit()
240 bio->bi_blkg = NULL; in bio_uninit()
243 if (bio_integrity(bio)) in bio_uninit()
244 bio_integrity_free(bio); in bio_uninit()
246 bio_crypt_free_ctx(bio); in bio_uninit()
250 static void bio_free(struct bio *bio) in bio_free() argument
252 struct bio_set *bs = bio->bi_pool; in bio_free()
[all …]
Dblk-map.c46 static int bio_copy_from_iter(struct bio *bio, struct iov_iter *iter) in bio_copy_from_iter() argument
51 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_copy_from_iter()
77 static int bio_copy_to_iter(struct bio *bio, struct iov_iter iter) in bio_copy_to_iter() argument
82 bio_for_each_segment_all(bvec, bio, iter_all) { in bio_copy_to_iter()
107 static int bio_uncopy_user(struct bio *bio) in bio_uncopy_user() argument
109 struct bio_map_data *bmd = bio->bi_private; in bio_uncopy_user()
120 else if (bio_data_dir(bio) == READ) in bio_uncopy_user()
121 ret = bio_copy_to_iter(bio, bmd->iter); in bio_uncopy_user()
123 bio_free_pages(bio); in bio_uncopy_user()
126 bio_put(bio); in bio_uncopy_user()
[all …]
Dblk-merge.c18 struct request *prev_rq, struct bio *prev, struct bio *next) in bio_will_gap()
31 bio_get_first_bvec(prev_rq->bio, &pb); in bio_will_gap()
53 static inline bool req_gap_back_merge(struct request *req, struct bio *bio) in req_gap_back_merge() argument
55 return bio_will_gap(req->q, req, req->biotail, bio); in req_gap_back_merge()
58 static inline bool req_gap_front_merge(struct request *req, struct bio *bio) in req_gap_front_merge() argument
60 return bio_will_gap(req->q, NULL, bio, req->bio); in req_gap_front_merge()
63 static struct bio *blk_bio_discard_split(struct request_queue *q, in blk_bio_discard_split()
64 struct bio *bio, in blk_bio_discard_split() argument
87 if (bio_sectors(bio) <= max_discard_sectors) in blk_bio_discard_split()
98 tmp = bio->bi_iter.bi_sector + split_sectors - alignment; in blk_bio_discard_split()
[all …]
Dblk-lib.c13 struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp) in blk_next_bio() argument
15 struct bio *new = bio_alloc(gfp, nr_pages); in blk_next_bio()
17 if (bio) { in blk_next_bio()
18 bio_chain(bio, new); in blk_next_bio()
19 submit_bio(bio); in blk_next_bio()
27 struct bio **biop) in __blkdev_issue_discard()
30 struct bio *bio = *biop; in __blkdev_issue_discard() local
97 bio = blk_next_bio(bio, 0, gfp_mask); in __blkdev_issue_discard()
98 bio->bi_iter.bi_sector = sector; in __blkdev_issue_discard()
99 bio_set_dev(bio, bdev); in __blkdev_issue_discard()
[all …]
Dbounce.c132 static void copy_to_high_bio_irq(struct bio *to, struct bio *from) in copy_to_high_bio_irq()
162 static void bounce_end_io(struct bio *bio, mempool_t *pool) in bounce_end_io() argument
164 struct bio *bio_orig = bio->bi_private; in bounce_end_io()
172 bio_for_each_segment_all(bvec, bio, iter_all) { in bounce_end_io()
181 bio_orig->bi_status = bio->bi_status; in bounce_end_io()
183 bio_put(bio); in bounce_end_io()
186 static void bounce_end_io_write(struct bio *bio) in bounce_end_io_write() argument
188 bounce_end_io(bio, &page_pool); in bounce_end_io_write()
191 static void bounce_end_io_write_isa(struct bio *bio) in bounce_end_io_write_isa() argument
194 bounce_end_io(bio, &isa_page_pool); in bounce_end_io_write_isa()
[all …]
Dblk-crypto-internal.h26 bool bio_crypt_rq_ctx_compatible(struct request *rq, struct bio *bio);
32 struct bio *bio) in bio_crypt_ctx_back_mergeable() argument
35 bio->bi_crypt_context); in bio_crypt_ctx_back_mergeable()
39 struct bio *bio) in bio_crypt_ctx_front_mergeable() argument
41 return bio_crypt_ctx_mergeable(bio->bi_crypt_context, in bio_crypt_ctx_front_mergeable()
42 bio->bi_iter.bi_size, req->crypt_ctx); in bio_crypt_ctx_front_mergeable()
71 struct bio *bio) in bio_crypt_rq_ctx_compatible() argument
77 struct bio *bio) in bio_crypt_ctx_front_mergeable() argument
83 struct bio *bio) in bio_crypt_ctx_back_mergeable() argument
108 void __bio_crypt_advance(struct bio *bio, unsigned int bytes);
[all …]
Dblk-core.c239 static void req_bio_endio(struct request *rq, struct bio *bio, in req_bio_endio() argument
243 bio->bi_status = error; in req_bio_endio()
246 bio_set_flag(bio, BIO_QUIET); in req_bio_endio()
248 bio_advance(bio, nbytes); in req_bio_endio()
255 if (bio->bi_iter.bi_size) in req_bio_endio()
256 bio->bi_status = BLK_STS_IOERR; in req_bio_endio()
258 bio->bi_iter.bi_sector = rq->__sector; in req_bio_endio()
262 if (bio->bi_iter.bi_size == 0 && !(rq->rq_flags & RQF_FLUSH_SEQ)) in req_bio_endio()
263 bio_endio(bio); in req_bio_endio()
276 rq->bio, rq->biotail, blk_rq_bytes(rq)); in blk_dump_rq_flags()
[all …]
Dbio-integrity.c50 struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio, in bio_integrity_alloc() argument
55 struct bio_set *bs = bio->bi_pool; in bio_integrity_alloc()
58 if (WARN_ON_ONCE(bio_has_crypt_ctx(bio))) in bio_integrity_alloc()
88 bip->bip_bio = bio; in bio_integrity_alloc()
89 bio->bi_integrity = bip; in bio_integrity_alloc()
90 bio->bi_opf |= REQ_INTEGRITY; in bio_integrity_alloc()
106 void bio_integrity_free(struct bio *bio) in bio_integrity_free() argument
108 struct bio_integrity_payload *bip = bio_integrity(bio); in bio_integrity_free()
109 struct bio_set *bs = bio->bi_pool; in bio_integrity_free()
116 bio->bi_integrity = NULL; in bio_integrity_free()
[all …]
Dblk.h89 static inline void blk_rq_bio_prep(struct request *rq, struct bio *bio, in blk_rq_bio_prep() argument
93 rq->__data_len = bio->bi_iter.bi_size; in blk_rq_bio_prep()
94 rq->bio = rq->biotail = bio; in blk_rq_bio_prep()
95 rq->ioprio = bio_prio(bio); in blk_rq_bio_prep()
97 if (bio->bi_disk) in blk_rq_bio_prep()
98 rq->rq_disk = bio->bi_disk; in blk_rq_bio_prep()
103 bool __bio_integrity_endio(struct bio *);
104 void bio_integrity_free(struct bio *bio);
105 static inline bool bio_integrity_endio(struct bio *bio) in bio_integrity_endio() argument
107 if (bio_integrity(bio)) in bio_integrity_endio()
[all …]
Dblk-crypto-fallback.c51 struct bio *bio; member
146 static void blk_crypto_fallback_encrypt_endio(struct bio *enc_bio) in blk_crypto_fallback_encrypt_endio()
148 struct bio *src_bio = enc_bio->bi_private; in blk_crypto_fallback_encrypt_endio()
161 static struct bio *blk_crypto_clone_bio(struct bio *bio_src) in blk_crypto_clone_bio()
165 struct bio *bio; in blk_crypto_clone_bio() local
167 bio = bio_alloc_bioset(GFP_NOIO, bio_segments(bio_src), NULL); in blk_crypto_clone_bio()
168 if (!bio) in blk_crypto_clone_bio()
170 bio->bi_disk = bio_src->bi_disk; in blk_crypto_clone_bio()
171 bio->bi_opf = bio_src->bi_opf; in blk_crypto_clone_bio()
172 bio->bi_ioprio = bio_src->bi_ioprio; in blk_crypto_clone_bio()
[all …]
Dblk-rq-qos.h38 void (*throttle)(struct rq_qos *, struct bio *);
39 void (*track)(struct rq_qos *, struct request *, struct bio *);
40 void (*merge)(struct rq_qos *, struct request *, struct bio *);
44 void (*done_bio)(struct rq_qos *, struct bio *);
45 void (*cleanup)(struct rq_qos *, struct bio *);
158 void __rq_qos_cleanup(struct rq_qos *rqos, struct bio *bio);
162 void __rq_qos_throttle(struct rq_qos *rqos, struct bio *bio);
163 void __rq_qos_track(struct rq_qos *rqos, struct request *rq, struct bio *bio);
164 void __rq_qos_merge(struct rq_qos *rqos, struct request *rq, struct bio *bio);
165 void __rq_qos_done_bio(struct rq_qos *rqos, struct bio *bio);
[all …]
/kernel/linux/linux-5.10/drivers/md/bcache/
Drequest.c40 static void bio_csum(struct bio *bio, struct bkey *k) in bio_csum() argument
46 bio_for_each_segment(bv, bio, iter) { in bio_csum()
111 struct bio *bio = op->bio; in bch_data_invalidate() local
114 bio_sectors(bio), (uint64_t) bio->bi_iter.bi_sector); in bch_data_invalidate()
116 while (bio_sectors(bio)) { in bch_data_invalidate()
117 unsigned int sectors = min(bio_sectors(bio), in bch_data_invalidate()
123 bio->bi_iter.bi_sector += sectors; in bch_data_invalidate()
124 bio->bi_iter.bi_size -= sectors << 9; in bch_data_invalidate()
128 bio->bi_iter.bi_sector, in bch_data_invalidate()
134 bio_put(bio); in bch_data_invalidate()
[all …]
Dio.c17 void bch_bbio_free(struct bio *bio, struct cache_set *c) in bch_bbio_free() argument
19 struct bbio *b = container_of(bio, struct bbio, bio); in bch_bbio_free()
24 struct bio *bch_bbio_alloc(struct cache_set *c) in bch_bbio_alloc()
27 struct bio *bio = &b->bio; in bch_bbio_alloc() local
29 bio_init(bio, bio->bi_inline_vecs, meta_bucket_pages(&c->cache->sb)); in bch_bbio_alloc()
31 return bio; in bch_bbio_alloc()
34 void __bch_submit_bbio(struct bio *bio, struct cache_set *c) in __bch_submit_bbio() argument
36 struct bbio *b = container_of(bio, struct bbio, bio); in __bch_submit_bbio()
38 bio->bi_iter.bi_sector = PTR_OFFSET(&b->key, 0); in __bch_submit_bbio()
39 bio_set_dev(bio, PTR_CACHE(c, &b->key, 0)->bdev); in __bch_submit_bbio()
[all …]
Dmovinggc.c19 struct bbio bio; member
48 struct bio *bio = &io->bio.bio; in write_moving_finish() local
50 bio_free_pages(bio); in write_moving_finish()
62 static void read_moving_endio(struct bio *bio) in read_moving_endio() argument
64 struct bbio *b = container_of(bio, struct bbio, bio); in read_moving_endio()
65 struct moving_io *io = container_of(bio->bi_private, in read_moving_endio()
68 if (bio->bi_status) in read_moving_endio()
69 io->op.status = bio->bi_status; in read_moving_endio()
75 bch_bbio_endio(io->op.c, bio, bio->bi_status, "reading data to move"); in read_moving_endio()
80 struct bio *bio = &io->bio.bio; in moving_init() local
[all …]
/kernel/linux/linux-5.10/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()
80 if (bio->bi_status || PageError(page)) { in __read_end_io()
89 if (bio->bi_private) in __read_end_io()
90 mempool_free(bio->bi_private, bio_post_read_ctx_pool); in __read_end_io()
91 bio_put(bio); in __read_end_io()
101 fscrypt_decrypt_bio(ctx->bio); in decrypt_work()
110 struct bio *bio = ctx->bio; in verity_work() local
121 bio->bi_private = NULL; in verity_work()
[all …]
/kernel/linux/linux-5.10/mm/
Dpage_io.c29 static struct bio *get_swap_bio(gfp_t gfp_flags, in get_swap_bio()
32 struct bio *bio; in get_swap_bio() local
34 bio = bio_alloc(gfp_flags, 1); in get_swap_bio()
35 if (bio) { in get_swap_bio()
38 bio->bi_iter.bi_sector = map_swap_page(page, &bdev); in get_swap_bio()
39 bio_set_dev(bio, bdev); in get_swap_bio()
40 bio->bi_iter.bi_sector <<= PAGE_SHIFT - 9; in get_swap_bio()
41 bio->bi_end_io = end_io; in get_swap_bio()
43 bio_add_page(bio, page, thp_size(page), 0); in get_swap_bio()
45 return bio; in get_swap_bio()
[all …]
/kernel/linux/linux-5.10/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(int op, int op_flags, struct bio *bio) in mpage_bio_submit() argument
63 bio->bi_end_io = mpage_end_io; in mpage_bio_submit()
64 bio_set_op_attrs(bio, op, op_flags); in mpage_bio_submit()
65 guard_bio_eod(bio); in mpage_bio_submit()
66 submit_bio(bio); in mpage_bio_submit()
[all …]
/kernel/linux/linux-5.10/drivers/nvme/target/
Dio-cmd-bdev.c162 static void nvmet_bio_done(struct bio *bio) in nvmet_bio_done() argument
164 struct nvmet_req *req = bio->bi_private; in nvmet_bio_done()
166 nvmet_req_complete(req, blk_to_nvme_status(req, bio->bi_status)); in nvmet_bio_done()
167 if (bio != &req->b.inline_bio) in nvmet_bio_done()
168 bio_put(bio); in nvmet_bio_done()
172 static int nvmet_bdev_alloc_bip(struct nvmet_req *req, struct bio *bio, in nvmet_bdev_alloc_bip() argument
187 bip = bio_integrity_alloc(bio, GFP_NOIO, in nvmet_bdev_alloc_bip()
194 bip->bip_iter.bi_size = bio_integrity_bytes(bi, bio_sectors(bio)); in nvmet_bdev_alloc_bip()
196 bip_set_seed(bip, bio->bi_iter.bi_sector >> in nvmet_bdev_alloc_bip()
202 rc = bio_integrity_add_page(bio, miter->page, len, in nvmet_bdev_alloc_bip()
[all …]
/kernel/linux/linux-5.10/drivers/md/
Ddm-bio-record.h32 static inline void dm_bio_record(struct dm_bio_details *bd, struct bio *bio) in dm_bio_record() argument
34 bd->bi_disk = bio->bi_disk; in dm_bio_record()
35 bd->bi_partno = bio->bi_partno; in dm_bio_record()
36 bd->bi_flags = bio->bi_flags; in dm_bio_record()
37 bd->bi_iter = bio->bi_iter; in dm_bio_record()
38 bd->__bi_remaining = atomic_read(&bio->__bi_remaining); in dm_bio_record()
39 bd->bi_end_io = bio->bi_end_io; in dm_bio_record()
41 bd->bi_integrity = bio_integrity(bio); in dm_bio_record()
45 static inline void dm_bio_restore(struct dm_bio_details *bd, struct bio *bio) in dm_bio_restore() argument
47 bio->bi_disk = bd->bi_disk; in dm_bio_restore()
[all …]
Ddm-raid1.c121 static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw) in queue_bio() argument
130 bio_list_add(bl, bio); in queue_bio()
140 struct bio *bio; in dispatch_bios() local
142 while ((bio = bio_list_pop(bio_list))) in dispatch_bios()
143 queue_bio(ms, bio, WRITE); in dispatch_bios()
163 static struct mirror *bio_get_m(struct bio *bio) in bio_get_m() argument
165 return (struct mirror *) bio->bi_next; in bio_get_m()
168 static void bio_set_m(struct bio *bio, struct mirror *m) in bio_set_m() argument
170 bio->bi_next = (struct bio *) m; in bio_set_m()
437 static int mirror_available(struct mirror_set *ms, struct bio *bio) in mirror_available() argument
[all …]
/kernel/linux/linux-5.10/include/trace/events/
Dblock.h238 TP_PROTO(struct request_queue *q, struct bio *bio),
240 TP_ARGS(q, bio),
251 __entry->dev = bio_dev(bio);
252 __entry->sector = bio->bi_iter.bi_sector;
253 __entry->nr_sector = bio_sectors(bio);
254 blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
274 TP_PROTO(struct request_queue *q, struct bio *bio),
276 TP_ARGS(q, bio),
287 __entry->dev = bio_dev(bio);
288 __entry->sector = bio->bi_iter.bi_sector;
[all …]
/kernel/linux/linux-5.10/fs/crypto/
Dbio.c29 void fscrypt_decrypt_bio(struct bio *bio) in fscrypt_decrypt_bio() argument
34 bio_for_each_segment_all(bv, bio, iter_all) { in fscrypt_decrypt_bio()
50 struct bio *bio; in fscrypt_zeroout_range_inline_crypt() local
55 bio = bio_alloc(GFP_NOFS, BIO_MAX_PAGES); in fscrypt_zeroout_range_inline_crypt()
62 fscrypt_set_bio_crypt_ctx(bio, inode, lblk, GFP_NOFS); in fscrypt_zeroout_range_inline_crypt()
63 bio_set_dev(bio, inode->i_sb->s_bdev); in fscrypt_zeroout_range_inline_crypt()
64 bio->bi_iter.bi_sector = in fscrypt_zeroout_range_inline_crypt()
66 bio_set_op_attrs(bio, REQ_OP_WRITE, 0); in fscrypt_zeroout_range_inline_crypt()
68 ret = bio_add_page(bio, ZERO_PAGE(0), bytes_this_page, 0); in fscrypt_zeroout_range_inline_crypt()
78 !fscrypt_mergeable_bio(bio, inode, lblk)) { in fscrypt_zeroout_range_inline_crypt()
[all …]
/kernel/linux/linux-5.10/fs/squashfs/
Dblock.c33 static int copy_bio_to_actor(struct bio *bio, in copy_bio_to_actor() argument
43 if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all))) in copy_bio_to_actor()
67 if (!bio_next_segment(bio, &iter_all)) in copy_bio_to_actor()
77 struct bio **biop, int *block_offset) in squashfs_bio_read()
88 struct bio *bio; in squashfs_bio_read() local
91 bio = bio_alloc(GFP_NOIO, page_count); in squashfs_bio_read()
93 bio = bio_kmalloc(GFP_NOIO, page_count); in squashfs_bio_read()
95 if (!bio) in squashfs_bio_read()
98 bio_set_dev(bio, sb->s_bdev); in squashfs_bio_read()
99 bio->bi_opf = READ; in squashfs_bio_read()
[all …]
/kernel/linux/linux-5.10/fs/xfs/
Dxfs_bio_io.c24 struct bio *bio; in xfs_rw_bdev() local
29 bio = bio_alloc(GFP_KERNEL, bio_max_vecs(left)); in xfs_rw_bdev()
30 bio_set_dev(bio, bdev); in xfs_rw_bdev()
31 bio->bi_iter.bi_sector = sector; in xfs_rw_bdev()
32 bio->bi_opf = op | REQ_META | REQ_SYNC; in xfs_rw_bdev()
39 while (bio_add_page(bio, page, len, off) != len) { in xfs_rw_bdev()
40 struct bio *prev = bio; in xfs_rw_bdev()
42 bio = bio_alloc(GFP_KERNEL, bio_max_vecs(left)); in xfs_rw_bdev()
43 bio_copy_dev(bio, prev); in xfs_rw_bdev()
44 bio->bi_iter.bi_sector = bio_end_sector(prev); in xfs_rw_bdev()
[all …]

12345678910>>...14