| 函数逻辑报告 | 
| Source Code: block\bio.c | Create Date:2022-07-27 18:31:13 | 
| Last Modify:2020-03-17 23:13:58 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:_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.
函数原型:struct bio *bio_map_user_iov(struct request_queue *q, struct iov_iter *iter, gfp_t gfp_mask)
返回类型:struct bio
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct request_queue * | q | |
| struct iov_iter * | iter | |
| gfp_t | gfp_mask | 
| 1398 | 如果非iov_iter_count(iter)则返回:错误号 | 
| 1401 | bio等于bio_kmalloc(gfp_mask, iov_iter_npages(iter, BIO_MAX_PAGES)) | 
| 1405 | 当iov_iter_count(iter)循环 | 
| 1408 | added等于0 | 
| 1412 | 如果此条件成立可能性小(为编译器优化)(bytes <= 0)则 | 
| 1417 | npages等于DIV_ROUND_UP(offs + bytes, PAGE_SIZE) | 
| 1419 | 如果此条件成立可能性小(为编译器优化)(offs & queue_dma_alignment(q))则 | 
| 1422 | 否则 | 
| 1426 | bool same_page = false | 
| 1433 | 如果same_page则Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. | 
| 1435 | 退出 | 
| 1440 | offs等于0 | 
| 1442 | iov_iter_advance(iter, added) | 
| 1455 | bio_set_flag(bio, BIO_USER_MAPPED) | 
| 1464 | 返回:bio | 
| 1466 | out_unmap : | 
| 1467 | bio_release_pages(bio, false) | 
| 1469 | 返回:错误号 | 
| 名称 | 描述 | 
|---|---|
| __blk_rq_map_user_iov | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |