函数逻辑报告 |
Source Code:fs\buffer.c |
Create Date:2022-07-29 10:45:21 |
| Last Modify:2020-03-18 10:38:29 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:On entry, the page is fully not uptodate.* On exit the page is fully uptodate in the areas outside (from,to)* The filesystem needs to handle block truncation upon failure.
函数原型:int nobh_write_begin(struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata, get_block_t *get_block)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct address_space * | mapping | |
| loff_t | pos | |
| unsigned | len | |
| unsigned | flags | |
| struct page ** | pagep | |
| void ** | fsdata | |
| get_block_t * | get_block |
| 2589 | nr_reads等于0 |
| 2590 | ret等于0 |
| 2591 | is_mapped_to_disk等于1 |
| 2593 | index等于pos右移PAGE_SHIFT determines the page size 位 |
| 2597 | page等于Find or create a page at the given pagecache position. Return the locked* page. This function is specifically for buffered writes. |
| 2601 | * fsdata = NULL |
| 2603 | 如果page_has_buffers(page)则 |
| 2605 | 如果此条件成立可能性小(为编译器优化)(ret)则转到:out_release |
| 2607 | 返回:ret |
| 2610 | 如果PageMappedToDisk(page)则返回:0 |
| 2622 | head等于Create the appropriate buffers when given a page for data area and* the size of each buffer |
| 2623 | 如果非head则 |
| 2625 | 转到:out_release |
| 2635 | 以block_start小于PAGE_SIZE循环 |
| 2640 | block_end等于block_start加blocksize |
| 2641 | buffer state bitmap (see above) 等于0 |
| 2642 | create等于1 |
| 2643 | 如果block_start大于等于to则create等于0 |
| 2645 | ret等于get_block(inode, block_in_file + block_in_page, bh, create) |
| 2649 | 如果非buffer_mapped(bh)则is_mapped_to_disk等于0 |
| 2651 | 如果buffer_new(bh)则clean_bdev_bh_alias(bh) |
| 2653 | 如果PageUptodate(page)则 |
| 2657 | 如果buffer_new(bh)或非buffer_mapped(bh)则 |
| 2658 | zero_user_segments(page, block_start, from, to, block_end) |
| 2660 | 继续下一循环 |
| 2664 | 如果block_start小于from或block_end大于to则 |
| 2672 | 如果nr_reads则 |
| 2679 | wait_on_buffer(bh) |
| 2687 | 如果is_mapped_to_disk则SetPageMappedToDisk(page) |
| 2692 | 返回:0 |
| 2694 | failed : |
| 2706 | out_release : |
| 2709 | * pagep = NULL |
| 2711 | 返回:ret |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |