函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-map.c Create Date:2022-07-27 18:40:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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:

函数原型: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)

返回类型:int

参数:

类型参数名称
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  如果非iter_is_iovec(iter)则转到:fail
133  如果map_datacopy = true
135  否则如果iov_iter_alignment(iter)按位与aligncopy = true
137  否则如果queue_virt_boundary(q)则copy等于queue_virt_boundary(q)按位与iov_iter_gap_alignment(iter)
140  i等于iter
141  循环
142  ret等于__blk_rq_map_user_iov(rq, map_data, & i, gfp_mask, copy)
143  如果ret则转到:unmap_rq
145  如果非biobio等于bio
147 iov_iter_count( & i)循环
149  如果非bio_flagged(bio, BIO_USER_MAPPED)则rq_flags或等于contains copies of user pages
151  返回:0
153  unmap_rq :
154  卸载一个用户数据的请求
155  fail :
156  bio = NULL
157  返回:ret
调用者
名称描述
blk_rq_map_userREQ_BLOCK_PC请求
sg_io