| 函数逻辑报告 | 
| Source Code: fs\direct-io.c | Create Date:2022-07-29 10:46:36 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Walk the user pages, and the file, mapping blocks to disk and generating* a sequence of (page,offset,len,block) mappings. These mappings are injected* into submit_page_section(), which takes care of the next stage of submission
函数原型:static int do_direct_IO(struct dio *dio, struct dio_submit *sdio, struct buffer_head *map_bh)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct dio * | dio | |
| struct dio_submit * | sdio | |
| struct buffer_head * | map_bh | 
| 946 | blkbits等于doesn't change | 
| 947 | i_blkbits等于blkbits加When we're using an alignment whichis finer than the filesystem's softblocksize, this specifies how muchfiner. blkfactor=2 means 1/4-blockalignment. Does not change | 
| 948 | ret等于0 | 
| 955 | 如果是错误则 | 
| 959 | from等于如果xt page to process 则0否则from | 
| 960 | to等于如果xt page to process 恒等于last valid page + 1 减1则to否则PAGE_SIZE | 
| 961 | xt page to process 自加 | 
| 968 | 如果At block_in_file. changes 恒等于0则 | 
| 976 | 如果ret则 | 
| 978 | 转到:out | 
| 980 | 如果非buffer_mapped(map_bh)则转到:do_holes | 
| 983 | At block_in_file. changes 等于 size of mapping 右移blkbits位 | 
| 987 | 如果buffer_new(map_bh)则 | 
| 994 | 如果非When we're using an alignment whichis finer than the filesystem's softblocksize, this specifies how muchfiner. blkfactor=2 means 1/4-blockalignment. Does not change 则转到:do_holes | 
| 1015 | do_holes : | 
| 1017 | 如果非buffer_mapped(map_bh)则 | 
| 1021 | 如果op恒等于REQ_OP_WRITE则 | 
| 1023 | 返回:负ENOTBLK | 
| 1036 | 转到:out | 
| 1042 | 转到:next_block | 
| 1059 | 如果this_chunk_blocks大于u则this_chunk_blocks等于u | 
| 1062 | 如果this_chunk_blocks大于u则this_chunk_blocks等于u | 
| 1064 | this_chunk_bytes等于this_chunk_blocks左移blkbits位 | 
| 1065 | BUG_ON(this_chunk_bytes == 0) | 
| 1067 | 如果this_chunk_blocks恒等于At block_in_file. changes 则prev block is at a boundary 等于buffer_boundary(map_bh) | 
| 1074 | 如果ret则 | 
| 1076 | 转到:out | 
| 1081 | from加等于this_chunk_bytes | 
| 1082 | IO result 加等于this_chunk_bytes | 
| 1084 | next_block : | 
| 1093 | out : | 
| 1094 | 返回:ret | 
| 名称 | 描述 | 
|---|---|
| do_blockdev_direct_IO | This is a library function for use by filesystem drivers | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |