Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lk_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:

Proto:int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, struct rq_map_data *map_data, const struct iov_iter *iter, gfp_t gfp_mask)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
struct request *rq
struct rq_map_data *map_data
const struct iov_iter *iter
gfp_tgfp_mask
124  bool copy = false
125  align = dma_pad_mask | queue_dma_alignment(q)
126  struct bio * bio = NULL
128  ret = -EINVAL
130  If Not iter_is_iovec(iter) Then Go to fail
133  If map_data Then copy = true
135  Else if iov_iter_alignment(iter) & align Then copy = true
137  Else if queue_virt_boundary(q) Then copy = queue_virt_boundary(q) & iov_iter_gap_alignment(iter)
140  i = iter
141  Do
142  ret = __blk_rq_map_user_iov(rq, map_data, & i, gfp_mask, copy)
143  If ret Then Go to unmap_rq
145  If Not bio Then bio = bio
147  When iov_iter_count( & i) cycle
149  If Not bio_flagged(bio, BIO_USER_MAPPED) Then rq_flags |= contains copies of user pages
151  Return 0
153  unmap_rq :
154  lk_rq_unmap_user - unmap a request with user data*@bio: start of bio list* Description:* Unmap a rq previously mapped by blk_rq_map_user(). The caller must* supply the original rq->bio from the blk_rq_map_user() return, since
155  fail :
156  bio = NULL
157  Return ret
Caller
NameDescribe
blk_rq_map_user
sg_io