函数逻辑报告 |
Source Code:fs\buffer.c |
Create Date:2022-07-29 10:45:15 |
Last Modify:2020-03-18 10:38:29 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:While block_write_full_page is writing back the dirty buffers under* the page lock, whoever dirtied the buffers may decide to clean them* again at any time
函数原型:int __block_write_full_page(struct inode *inode, struct page *page, get_block_t *get_block, struct writeback_control *wbc, bh_end_io_t *handler)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct inode * | inode | |
struct page * | page | |
get_block_t * | get_block | |
struct writeback_control * | wbc | |
bh_end_io_t * | handler |
1718 | nr_underway等于0 |
1719 | write_flags等于wbc_to_write_flags(wbc) |
1721 | head等于create_page_buffers(page, inode, (1 << BH_Dirty) | (1 << BH_Uptodate)) |
1735 | blocksize等于 size of mapping |
1745 | 循环 |
1746 | 如果block大于last_block则 |
1755 | clear_buffer_dirty(bh) |
1757 | 否则如果非buffer_mapped(bh)或buffer_delay(bh)的值且buffer_dirty(bh)则 |
1759 | WARN_ON( size of mapping != blocksize) |
1763 | clear_buffer_delay(bh) |
1764 | 如果buffer_new(bh)则 |
1766 | clear_buffer_new(bh) |
1767 | clean_bdev_bh_alias(bh) |
1771 | block自加 |
1774 | 循环 |
1775 | 如果非buffer_mapped(bh)则继续下一循环 |
1784 | 如果sync_mode不等于Don't wait on anything 则 |
1785 | lock_buffer(bh) |
1786 | 否则如果非trylock_buffer(bh)则 |
1790 | 如果test_clear_buffer_dirty(bh)则 |
1792 | 否则 |
1793 | unlock_buffer(bh) |
1795 | 当bh等于 circular list of page's buffers 不等于head循环 |
1801 | BUG_ON(Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting.) |
1802 | set_page_writeback(page) |
1804 | 循环 |
1806 | 如果buffer_async_write(bh)则 |
1807 | submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, i_write_hint, wbc) |
1809 | nr_underway自加 |
1815 | err等于0 |
1816 | done : |
1817 | 如果nr_underway恒等于0则 |
1830 | 返回:err |
1832 | recover : |
1841 | 循环 |
1842 | 如果buffer_mapped(bh)且buffer_dirty(bh)且非buffer_delay(bh)则 |
1844 | lock_buffer(bh) |
1846 | 否则 |
1851 | clear_buffer_dirty(bh) |
1853 | 当bh等于 circular list of page's buffers 不等于head循环 |
1854 | SetPageError(page) |
1855 | BUG_ON(Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting.) |
1857 | set_page_writeback(page) |
1858 | 循环 |
1860 | 如果buffer_async_write(bh)则 |
1861 | clear_buffer_dirty(bh) |
1862 | submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, i_write_hint, wbc) |
1864 | nr_underway自加 |
1869 | 转到:done |
名称 | 描述 |
---|---|
nobh_writepage | bh_writepage() - based on block_full_write_page() except* that it tries to operate without attaching bufferheads to* the page. |
block_write_full_page | The generic ->writepage function for buffer-backed address_spaces |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |