Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-map.c Create Date:2022-07-28 17:04:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__blk_rq_map_user_iov

Proto:static int __blk_rq_map_user_iov(struct request *rq, struct rq_map_data *map_data, struct iov_iter *iter, gfp_t gfp_mask, bool copy)

Type:int

Parameter:

TypeParameterName
struct request *rq
struct rq_map_data *map_data
struct iov_iter *iter
gfp_tgfp_mask
boolcopy
68  q = q
72  If copy Then bio = _copy_user_iov - copy user data to bio*@q: destination block queue*@map_data: pointer to the rq_map_data holding pages (if necessary)*@iter: iovec iterator*@gfp_mask: memory allocation flags* Prepares and returns a bio for indirect user io, bouncing data
74  Else bio = _map_user_iov - map user iovec into bio*@q: the struct request_queue for the bio*@iter: iovec iterator*@gfp_mask: memory allocation flags* Map the user space address into a bio suitable for io to a block* device. Returns an error pointer in case of error.
77  If IS_ERR(bio) Then Return PTR_ERR(bio)
80  bottom bits req flags, * top bits REQ_OP. Use * accessors. &= ~REQ_OP_MASK
81  bottom bits req flags, * top bits REQ_OP. Use * accessors. |= req_op(rq)
83  orig_bio = bio
89  ret = Append a bio to a passthrough request. Only works if the bio can be merged* into the request based on the driver constraints.
90  If ret Then
91  __blk_rq_unmap_user(orig_bio)
92  Return ret
94  get a reference to a bio, so it won't disappear. the intended use is* something like:* bio_get(bio);* submit_bio(rw, bio);* if (bio->bi_flags ...)* do_something* bio_put(bio);* without the bio_get(), it could potentially complete I/O before submit_bio
96  Return 0
Caller
NameDescribe
blk_rq_map_user_iovlk_rq_map_user_iov - map user data to a request, for passthrough requests*@q: request queue where request should be inserted*@rq: request to map data to*@map_data: pointer to the rq_map_data holding pages (if necessary)*@iter: iovec iterator*@gfp_mask: