函数逻辑报告 |
Source Code:fs\mpage.c |
Create Date:2022-07-29 10:46:58 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:This is the worker routine which does all the work of mapping the disk* blocks and constructs largest possible bios, submits them for IO if the* blocks are not contiguous on the disk
函数原型:static struct bio *do_mpage_readpage(struct mpage_readpage_args *args)
返回类型:struct bio
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct mpage_readpage_args * | args |
| 161 | blocks_per_page等于PAGE_SIZE右移blkbits位 |
| 170 | struct block_device * bdev = NULL |
| 172 | fully_mapped等于1 |
| 178 | 如果is_readahead则 |
| 181 | 否则 |
| 186 | 如果page_has_buffers(page)则转到:confused |
| 194 | page_block等于0 |
| 199 | nblocks等于 size of mapping 右移blkbits位 |
| 204 | last等于nblocks减map_offset |
| 206 | 循环 |
| 207 | 如果relative_block恒等于last则 |
| 209 | 退出 |
| 211 | 如果page_block恒等于blocks_per_page则退出 |
| 215 | page_block自加 |
| 216 | block_in_file自加 |
| 225 | 当page_block小于blocks_per_page循环 |
| 226 | buffer state bitmap (see above) 等于0 |
| 227 | size of mapping 等于0 |
| 229 | 如果block_in_file小于last_block则 |
| 231 | 如果get_block(inode, block_in_file, map_bh, 0)则转到:confused |
| 236 | 如果非buffer_mapped(map_bh)则 |
| 237 | fully_mapped等于0 |
| 238 | 如果first_hole恒等于blocks_per_page则first_hole等于page_block |
| 240 | page_block自加 |
| 241 | block_in_file自加 |
| 242 | 继续下一循环 |
| 253 | 转到:confused |
| 256 | 如果first_hole不等于blocks_per_page则转到:confused |
| 260 | 如果page_block且blocks[page_block - 1]不等于 start block number 减1则转到:confused |
| 262 | nblocks等于 size of mapping 右移blkbits位 |
| 263 | 循环 |
| 264 | 如果relative_block恒等于nblocks则 |
| 266 | 退出 |
| 267 | 否则如果page_block恒等于blocks_per_page则退出 |
| 270 | page_block自加 |
| 271 | block_in_file自加 |
| 276 | 如果first_hole不等于blocks_per_page则 |
| 277 | zero_user_segment(page, first_hole << blkbits, PAGE_SIZE) |
| 278 | 如果first_hole恒等于0则 |
| 283 | 否则如果fully_mapped则 |
| 284 | SetPageMappedToDisk(page) |
| 287 | 如果fully_mapped且blocks_per_page恒等于1且非PageUptodate(page)且cleancache_get_page(page)恒等于0则 |
| 289 | SetPageUptodate(page) |
| 290 | 转到:confused |
| 296 | 如果bio且last_block_in_bio不等于blocks[0]减1则bio等于mpage_bio_submit(REQ_OP_READ, op_flags, bio) |
| 299 | alloc_new : |
| 300 | 如果(bio == NULL)则 |
| 301 | 如果first_hole恒等于blocks_per_page则 |
| 314 | length等于first_hole左移blkbits位 |
| 315 | 如果bio_add_page(bio, page, length, 0)小于length则 |
| 316 | bio等于mpage_bio_submit(REQ_OP_READ, op_flags, bio) |
| 317 | 转到:alloc_new |
| 321 | nblocks等于 size of mapping 右移blkbits位 |
| 322 | 如果buffer_boundary(map_bh)且relative_block恒等于nblocks或first_hole不等于blocks_per_page则bio等于mpage_bio_submit(REQ_OP_READ, op_flags, bio) |
| 325 | 否则last_block_in_bio等于blocks[blocks_per_page - 1] |
| 327 | out : |
| 328 | 返回:bio |
| 330 | confused : |
| 331 | 如果bio则bio等于mpage_bio_submit(REQ_OP_READ, op_flags, bio) |
| 333 | 如果非PageUptodate(page)则Generic "read page" function for block devices that have the normal* get_block functionality |
| 337 | 转到:out |
| 名称 | 描述 |
|---|---|
| mpage_readpages | mpage_readpages - populate an address space with some pages & start reads against them*@mapping: the address_space*@pages: The address of a list_head which contains the target pages. These |
| mpage_readpage | This isn't called much at all |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |